Skip to content

Commit 7093c3c

Browse files
committed
review feedback
1 parent 730f520 commit 7093c3c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

nexus/postgres-connection/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ edition = "2024"
77

88
[dependencies]
99
anyhow = "1"
10+
base64 = "0.22"
1011
futures-util = { version = "0.3", default-features = false, features = ["io"] }
1112
pt = { path = "../pt" }
1213
rustls = { version = "0.23", default-features = false, features = ["aws-lc-rs"] }
@@ -18,4 +19,4 @@ tokio-util = { version = "0.7", features = ["compat"] }
1819
tokio-stream = "0.1"
1920
tracing.workspace = true
2021
urlencoding = "2"
21-
base64 = "0.22"
22+

nexus/postgres-connection/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ pub async fn create_tunnel(
103103
format!("Failed to decode private key: {e}"),
104104
)
105105
})?;
106-
let private_key = String::from_utf8(private_key_bytes).map_err(|e| {
106+
let private_key = str::from_utf8(private_key_bytes.as_slice()).map_err(|e| {
107107
io::Error::new(
108108
io::ErrorKind::InvalidData,
109109
format!("Invalid UTF-8 in private key: {e}"),
110110
)
111111
})?;
112-
session.userauth_pubkey_memory(&ssh_config.user, None, &private_key, None)?;
112+
session.userauth_pubkey_memory(&ssh_config.user, None, private_key, None)?;
113113
}
114114
if !ssh_config.host_key.is_empty() {
115115
let mut known_hosts = session.known_hosts()?;

0 commit comments

Comments
 (0)