From a45bbec25952a15cacb105b536432d6fbe3fb7b1 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Sun, 30 Jun 2024 04:42:07 +0200 Subject: jsonrpc: remove unwrap() and use expect() for examples, docs, and tests --- jsonrpc/tests/rpc_impl.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'jsonrpc/tests/rpc_impl.rs') diff --git a/jsonrpc/tests/rpc_impl.rs b/jsonrpc/tests/rpc_impl.rs index 64e3bb1..2a24bbf 100644 --- a/jsonrpc/tests/rpc_impl.rs +++ b/jsonrpc/tests/rpc_impl.rs @@ -20,7 +20,10 @@ fn rpc_impl_service() { let params = serde_json::json!("params"); smol::block_on(async { - let foo_method = f.get_method("foo").unwrap(); - assert_eq!(foo_method(params.clone()).await.unwrap(), params); + let foo_method = f.get_method("foo").expect("Get method foo"); + assert_eq!( + foo_method(params.clone()).await.expect("Call foo method"), + params + ); }); } -- cgit v1.2.3