Skip to content

Commit f898c2e

Browse files
committed
Bump rust version in CI and fix clippy warnings
1 parent b114de3 commit f898c2e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- run: docker compose up -d
5858
- uses: sfackler/actions/rustup@master
5959
with:
60-
version: 1.62.0
60+
version: 1.65.0
6161
- run: echo "::set-output name=version::$(rustc --version)"
6262
id: rust-version
6363
- uses: actions/cache@v1

postgres-derive-test/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ where
1414
T: PartialEq + FromSqlOwned + ToSql + Sync,
1515
S: fmt::Display,
1616
{
17-
for &(ref val, ref repr) in checks.iter() {
17+
for (val, repr) in checks.iter() {
1818
let stmt = conn
1919
.prepare(&format!("SELECT {}::{}", *repr, sql_type))
2020
.unwrap();
@@ -38,7 +38,7 @@ pub fn test_type_asymmetric<T, F, S, C>(
3838
S: fmt::Display,
3939
C: Fn(&T, &F) -> bool,
4040
{
41-
for &(ref val, ref repr) in checks.iter() {
41+
for (val, repr) in checks.iter() {
4242
let stmt = conn
4343
.prepare(&format!("SELECT {}::{}", *repr, sql_type))
4444
.unwrap();

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)