From e120721e6ca1fff9444cf058c44c70a969fbee1f Mon Sep 17 00:00:00 2001 From: Patrick Crumley Date: Wed, 18 Oct 2023 20:37:29 -0700 Subject: [PATCH] handle new clippy lints (#1364) # Description @swift-nav/devinfra Small cleanup to unbreak CI # API compatibility Does this change introduce a API compatibility risk? No, simply a code hygiene change. # JIRA Reference N/A --- rust/sbp/src/sbp_string.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/sbp/src/sbp_string.rs b/rust/sbp/src/sbp_string.rs index b7baee92a..19191f95f 100644 --- a/rust/sbp/src/sbp_string.rs +++ b/rust/sbp/src/sbp_string.rs @@ -49,7 +49,7 @@ impl> SbpString { impl> SbpString { pub fn null_terminated(data: T) -> Result { match data.as_ref().last() { - Some(l) if l == &0 => Ok(Self::new(data)), + Some(&0) => Ok(Self::new(data)), _ => Err(NullTerminatedError), } } @@ -79,7 +79,7 @@ impl SbpString, Multipart> { pub fn multipart(data: impl Into>) -> Result { let data = data.into(); match data.last() { - Some(l) if l == &0 => Ok(Self::new(data)), + Some(&0) => Ok(Self::new(data)), _ => Err(MultipartError), } }