From a21c571ca09329e8e2fe6f147edf00ce1b61cecc Mon Sep 17 00:00:00 2001 From: Ziyang Hu Date: Wed, 12 Apr 2023 20:19:25 +0800 Subject: [PATCH] fix https://github.com/cozodb/cozo/issues/55 --- cozo-bin/src/repl.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cozo-bin/src/repl.rs b/cozo-bin/src/repl.rs index d83fde14..d79fb9a1 100644 --- a/cozo-bin/src/repl.rs +++ b/cozo-bin/src/repl.rs @@ -208,7 +208,8 @@ fn process_line( .trim() .split_once(|c: char| c.is_whitespace()) .ok_or_else(|| miette!("Bad set syntax. Should be '%set '."))?; - let val = serde_json::from_str(v_str).into_diagnostic()?; + let val: Value = serde_json::from_str(v_str).into_diagnostic()?; + let val = DataValue::from(val); params.insert(key.to_string(), val); } "unset" => {