Skip to content

Commit e120721

Browse files
authored
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
1 parent 0bfe6c6 commit e120721

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/sbp/src/sbp_string.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl<T: AsRef<[u8]>> SbpString<T, Unterminated> {
4949
impl<T: AsRef<[u8]>> SbpString<T, NullTerminated> {
5050
pub fn null_terminated(data: T) -> Result<Self, NullTerminatedError> {
5151
match data.as_ref().last() {
52-
Some(l) if l == &0 => Ok(Self::new(data)),
52+
Some(&0) => Ok(Self::new(data)),
5353
_ => Err(NullTerminatedError),
5454
}
5555
}
@@ -79,7 +79,7 @@ impl SbpString<Vec<u8>, Multipart> {
7979
pub fn multipart(data: impl Into<Vec<u8>>) -> Result<Self, MultipartError> {
8080
let data = data.into();
8181
match data.last() {
82-
Some(l) if l == &0 => Ok(Self::new(data)),
82+
Some(&0) => Ok(Self::new(data)),
8383
_ => Err(MultipartError),
8484
}
8585
}

0 commit comments

Comments
 (0)