Skip to content

Commit 3682140

Browse files
committed
clippy fixes
1 parent 6253f35 commit 3682140

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

postgres-protocol/src/authentication/sasl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ impl<'a> Parser<'a> {
389389
}
390390

391391
fn posit_number(&mut self) -> io::Result<u32> {
392-
let n = self.take_while(|c| matches!(c, '0'..='9'))?;
392+
let n = self.take_while(|c| c.is_ascii_digit())?;
393393
n.parse()
394394
.map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))
395395
}

postgres-protocol/src/message/backend.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ impl<'a> FallibleIterator for DataRowRanges<'a> {
707707
));
708708
}
709709
let base = self.len - self.buf.len();
710-
self.buf = &self.buf[len as usize..];
710+
self.buf = &self.buf[len..];
711711
Ok(Some(Some(base..base + len)))
712712
}
713713
}

0 commit comments

Comments
 (0)