From 07eb6d4bcaccd8b49a181873354457ea8a1289ab Mon Sep 17 00:00:00 2001 From: Martin Bartlett Date: Mon, 28 Oct 2024 15:38:13 +0100 Subject: [PATCH] Clippy lints --- src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b08ff80b..37f2e42d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1127,11 +1127,11 @@ mod tests { let v = d.as_value(); assert!(v.contains_key("payload"), "Failed to find payload key"); - let v = v.get("payload").unwrap(); - assert!(v.is_object(), "payload not recognized as object: {:?}", v); + let v = v.get("payload").expect("Can't get payload"); + assert!(v.is_object(), "payload not recognized as object: {v:?}"); assert!(v.contains_key("features"), "Failed to find features key"); - let v = v.get("features").unwrap(); - assert!(v.is_array(), "features not recognized as array: {:?}", v); + let v = v.get("features").expect("can't get features"); + assert!(v.is_array(), "features not recognized as array: {v:?}"); // proving that value peeking doesn't affect the deserializer