From d8c21ec70d60f5e4a4675a16bc596cbf60eefc8f Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Mon, 30 Oct 2023 16:43:06 +0000 Subject: [PATCH] fix nightly 1.75 (#5719) ## Problem Neon doesn't compile on nightly and had numerous clippy complaints. ## Summary of changes 1. Fixed troublesome dependency 2. Fixed or ignored the lints where appropriate --- Cargo.lock | 23 ++++--------------- libs/postgres_ffi/wal_craft/src/lib.rs | 1 + .../walreceiver/walreceiver_connection.rs | 2 +- proxy/src/console/provider/mock.rs | 2 +- proxy/src/scram.rs | 1 - 5 files changed, 7 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f7598a79cffe..39c33304ae69 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1609,16 +1609,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - [[package]] name = "ctr" version = "0.6.0" @@ -2714,11 +2704,10 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ - "cfg-if", "value-bag", ] @@ -6011,13 +6000,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.0.0-alpha.9" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" -dependencies = [ - "ctor", - "version_check", -] +checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" [[package]] name = "vcpkg" diff --git a/libs/postgres_ffi/wal_craft/src/lib.rs b/libs/postgres_ffi/wal_craft/src/lib.rs index 75ffd3f05501..281a180e3ba3 100644 --- a/libs/postgres_ffi/wal_craft/src/lib.rs +++ b/libs/postgres_ffi/wal_craft/src/lib.rs @@ -14,6 +14,7 @@ macro_rules! xlog_utils_test { ($version:ident) => { #[path = "."] mod $version { + #[allow(unused_imports)] pub use postgres_ffi::$version::wal_craft_test_export::*; #[allow(clippy::duplicate_mod)] #[cfg(test)] diff --git a/pageserver/src/tenant/timeline/walreceiver/walreceiver_connection.rs b/pageserver/src/tenant/timeline/walreceiver/walreceiver_connection.rs index 3a6599ec553c..3e56753ad495 100644 --- a/pageserver/src/tenant/timeline/walreceiver/walreceiver_connection.rs +++ b/pageserver/src/tenant/timeline/walreceiver/walreceiver_connection.rs @@ -459,7 +459,7 @@ async fn identify_system(client: &Client) -> anyhow::Result { // extract the row contents into an IdentifySystem struct. // written as a closure so I can use ? for Option here. - if let Some(SimpleQueryMessage::Row(first_row)) = response.get(0) { + if let Some(SimpleQueryMessage::Row(first_row)) = response.first() { Ok(IdentifySystem { systemid: get_parse(first_row, 0)?, timeline: get_parse(first_row, 1)?, diff --git a/proxy/src/console/provider/mock.rs b/proxy/src/console/provider/mock.rs index 282567269d18..750a2d141ea3 100644 --- a/proxy/src/console/provider/mock.rs +++ b/proxy/src/console/provider/mock.rs @@ -59,7 +59,7 @@ impl Api { let rows = client.query(query, &[&creds.user]).await?; // We can get at most one row, because `rolname` is unique. - let row = match rows.get(0) { + let row = match rows.first() { Some(row) => row, // This means that the user doesn't exist, so there can be no secret. // However, this is still a *valid* outcome which is very similar diff --git a/proxy/src/scram.rs b/proxy/src/scram.rs index 07822e8da57a..2de26af96b3b 100644 --- a/proxy/src/scram.rs +++ b/proxy/src/scram.rs @@ -18,7 +18,6 @@ mod password; pub use exchange::Exchange; pub use key::ScramKey; pub use secret::ServerSecret; -pub use secret::*; use hmac::{Hmac, Mac}; use sha2::{Digest, Sha256};