From 916b5041cdab0f688e55741ada8b3f4d83ee8cee Mon Sep 17 00:00:00 2001 From: Justin Pflueger Date: Tue, 28 Mar 2023 14:46:57 -0600 Subject: [PATCH] fix lint error Signed-off-by: Justin Pflueger --- src/request.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request.rs b/src/request.rs index dac1df4..bc808bb 100644 --- a/src/request.rs +++ b/src/request.rs @@ -13,7 +13,7 @@ impl TryInto for Option<&Bytes> { fn try_into(self) -> Result { match self { None => Ok(Default::default()), - Some(b) if b.len() == 0 => Ok(Default::default()), + Some(b) if b.is_empty() => Ok(Default::default()), Some(b) => serde_json::from_slice::(b).map_err(|e| e.into()), } }