From 6b53c2cded2039cf318ec82641b64179e67e87e1 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Thu, 13 Jan 2022 16:23:15 -0800 Subject: [PATCH] Don't `unwrap()` --- src/status_menu.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/status_menu.rs b/src/status_menu.rs index a65bbee1..2a233d57 100644 --- a/src/status_menu.rs +++ b/src/status_menu.rs @@ -260,8 +260,7 @@ pub struct Layout(i32, LayoutProps, Vec); impl<'a> serde::Deserialize<'a> for Layout { fn deserialize>(deserializer: D) -> Result { let (id, props, children) = - <(i32, LayoutProps, Vec<(zvariant::Signature<'_>, Self)>)>::deserialize(deserializer) - .unwrap(); + <(i32, LayoutProps, Vec<(zvariant::Signature<'_>, Self)>)>::deserialize(deserializer)?; Ok(Self(id, props, children.into_iter().map(|x| x.1).collect())) } }