From abe0175c96c9b487cbfc1e09be3dceced8c54394 Mon Sep 17 00:00:00 2001 From: lovasoa Date: Wed, 23 Sep 2026 16:18:53 +0200 Subject: [PATCH 1/5] fix: satisfy clippy on latest stable --- sqlx-core/src/logger.rs | 4 ++-- sqlx-core/src/mssql/connection/stream.rs | 2 +- sqlx-core/src/postgres/connection/sasl.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sqlx-core/src/logger.rs b/sqlx-core/src/logger.rs index 6cfd80d215..ec52f04664 100644 --- a/sqlx-core/src/logger.rs +++ b/sqlx-core/src/logger.rs @@ -51,7 +51,7 @@ impl<'q> QueryLogger<'q> { let sql = if summary != self.sql { summary.push_str(" …"); - format!("\n\n{}\n", &self.sql) + format!("\n\n{}\n", self.sql) } else { String::new() }; @@ -125,7 +125,7 @@ impl<'q, O: Debug + Hash + Eq, R: Debug, P: Debug> QueryPlanLogger<'q, O, R, P> let sql = if summary != self.sql { summary.push_str(" …"); - format!("\n\n{}\n", &self.sql) + format!("\n\n{}\n", self.sql) } else { String::new() }; diff --git a/sqlx-core/src/mssql/connection/stream.rs b/sqlx-core/src/mssql/connection/stream.rs index 0911d4d235..8a35beae30 100644 --- a/sqlx-core/src/mssql/connection/stream.rs +++ b/sqlx-core/src/mssql/connection/stream.rs @@ -342,7 +342,7 @@ pub(crate) fn write_packets<'en, T: Encode<'en>>( ); } - packet_header.truncate(0); + packet_header.clear(); PacketHeader { r#type: ty, status: if is_last { diff --git a/sqlx-core/src/postgres/connection/sasl.rs b/sqlx-core/src/postgres/connection/sasl.rs index 6e6ee68339..665590d313 100644 --- a/sqlx-core/src/postgres/connection/sasl.rs +++ b/sqlx-core/src/postgres/connection/sasl.rs @@ -113,7 +113,7 @@ pub(crate) async fn authenticate( let client_final_message_wo_proof = format!( "{channel_binding},r={nonce}", channel_binding = channel_binding, - nonce = &cont.nonce + nonce = cont.nonce ); // AuthMessage := client-first-message-bare + "," + server-first-message + "," + client-final-message-without-proof From ceef25f4cb51d79c3c33e7dc30f98296d32f7394 Mon Sep 17 00:00:00 2001 From: lovasoa Date: Wed, 23 Sep 2026 16:49:17 +0200 Subject: [PATCH 2/5] ci: pin clippy to Rust 1.98.1 --- .github/workflows/sqlx.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/sqlx.yml b/.github/workflows/sqlx.yml index a147a0d267..95771e2afb 100644 --- a/.github/workflows/sqlx.yml +++ b/.github/workflows/sqlx.yml @@ -22,6 +22,11 @@ jobs: tls: [native-tls, rustls] steps: - uses: actions/checkout@v6 + - name: Install pinned Clippy toolchain + uses: dtolnay/rust-toolchain@ce678459e9fc7500d337468f904b95f1b5c10b5e + with: + toolchain: 1.98.1 + components: clippy - uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68 with: prefix-key: v1-sqlx From 5b27970ee9cfaf1006ed5bb9366ab5aaa3e7ac52 Mon Sep 17 00:00:00 2001 From: lovasoa Date: Wed, 23 Sep 2026 16:55:39 +0200 Subject: [PATCH 3/5] fix(clippy): remove redundant formatting borrow --- sqlx-macros/src/query/output.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlx-macros/src/query/output.rs b/sqlx-macros/src/query/output.rs index a08451ed87..4e1f0c6787 100644 --- a/sqlx-macros/src/query/output.rs +++ b/sqlx-macros/src/query/output.rs @@ -226,7 +226,7 @@ fn get_column_type(i: usize, column: &DB::Column) -> TokenStrea if let Some(feature_gate) = ::get_feature_gate(type_info) { format!( "optional feature `{feat}` required for type {ty} of {col}", - ty = &type_info, + ty = type_info, feat = feature_gate, col = DisplayColumn { idx: i, From 9e089c59fc0f77c0f4615b360c69a9b0cec13a1a Mon Sep 17 00:00:00 2001 From: lovasoa Date: Wed, 23 Sep 2026 17:03:39 +0200 Subject: [PATCH 4/5] test: remove useless format in postgres type fixture --- tests/postgres/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/postgres/types.rs b/tests/postgres/types.rs index 72914e0293..20f52fe426 100644 --- a/tests/postgres/types.rs +++ b/tests/postgres/types.rs @@ -69,7 +69,7 @@ test_type!(str<&str>(Postgres, )); test_type!(string(Postgres, - "'this is foo'" == format!("this is foo"), + "'this is foo'" == "this is foo".to_string(), )); test_type!(string_vec>(Postgres, From db31afbbd4413b535f58e9225797473f7665bb24 Mon Sep 17 00:00:00 2001 From: lovasoa Date: Wed, 23 Sep 2026 17:09:21 +0200 Subject: [PATCH 5/5] ci: use pinned toolchain action without ignored input --- .github/workflows/sqlx.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/sqlx.yml b/.github/workflows/sqlx.yml index 95771e2afb..5162d034b9 100644 --- a/.github/workflows/sqlx.yml +++ b/.github/workflows/sqlx.yml @@ -25,7 +25,6 @@ jobs: - name: Install pinned Clippy toolchain uses: dtolnay/rust-toolchain@ce678459e9fc7500d337468f904b95f1b5c10b5e with: - toolchain: 1.98.1 components: clippy - uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68 with: