Fix a bunch of linter warnings

This commit is contained in:
Erik Grinaker
2025-06-30 11:10:02 +02:00
parent 9d9e3cd08a
commit 67b04f8ab3
28 changed files with 228 additions and 404 deletions

View File

@@ -271,7 +271,6 @@ fn extract_pageserver_conninfo_from_guc(
PageserverConnectionInfo {
shards: pageserver_connstring_guc
.split(',')
.into_iter()
.enumerate()
.map(|(i, connstr)| {
(

View File

@@ -83,13 +83,13 @@ fn acquire_lsn_lease_with_retry(
spec.pageserver_conninfo
.shards
.iter()
.map(|(_shardno, conninfo)| {
.values()
.map(|conninfo| {
// FIXME: for now, this requires a libpq connection, the grpc API doesn't
// have a "lease" method.
let connstr = conninfo.libpq_url.as_ref().expect("missing libpq URL");
let mut config = postgres::Config::from_str(&connstr).expect("Invalid connstr");
let mut config = postgres::Config::from_str(connstr).expect("Invalid connstr");
if let Some(storage_auth_token) = &spec.storage_auth_token {
config.password(storage_auth_token.clone());
}