diff options
author | Blaž Hrastnik | 2022-06-27 08:27:44 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-06-27 08:27:44 +0000 |
commit | 24f03097e3b4aef62aa56bb27e0853b60a4cb417 (patch) | |
tree | 29c37c06d8787710f5140557fb11da73013bb2fe /helix-lsp/src/jsonrpc.rs | |
parent | 33d287a9ad4e72311cf74c7070406626f8cad4bb (diff) |
Remove some more unwraps
Diffstat (limited to 'helix-lsp/src/jsonrpc.rs')
-rw-r--r-- | helix-lsp/src/jsonrpc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-lsp/src/jsonrpc.rs b/helix-lsp/src/jsonrpc.rs index b9b3fd2c..ed63da13 100644 --- a/helix-lsp/src/jsonrpc.rs +++ b/helix-lsp/src/jsonrpc.rs @@ -310,7 +310,7 @@ fn method_call_serialize() { id: Id::Num(1), }; - let serialized = serde_json::to_string(&m).unwrap(); + let serialized = serde_json::json!(&m); assert_eq!( serialized, r#"{"jsonrpc":"2.0","method":"update","params":[1,2],"id":1}"# @@ -327,7 +327,7 @@ fn notification_serialize() { params: Params::Array(vec![Value::from(1), Value::from(2)]), }; - let serialized = serde_json::to_string(&n).unwrap(); + let serialized = serde_json::json!(&n); assert_eq!( serialized, r#"{"jsonrpc":"2.0","method":"update","params":[1,2]}"# |