From 959992ac7a4f259282a7fab9a438f96741a3415e Mon Sep 17 00:00:00 2001 From: sigoden Date: Thu, 9 Nov 2023 19:46:38 +0800 Subject: [PATCH] optimize parse symbol error message --- src/command/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/mod.rs b/src/command/mod.rs index 5c2ce356..e2cc0a00 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -140,7 +140,7 @@ impl Command { let cmd = Self::get_cmd(&mut root_cmd, "@meta", position)?; if key == "symbol" { let (ch, name, choice_fn) = parse_symbol(&value).ok_or_else(|| { - anyhow!("@meta(line {}) invalid symbol '{}'", position, value,) + anyhow!("@meta(line {}) invalid symbol value", position) })?; cmd.symbols .insert(ch, (name.to_string(), choice_fn.map(|v| v.to_string())));