Address clippy lint in SSH signing

This commit is contained in:
xiaotianxt 2026-04-23 23:24:57 -04:00
parent d76ed14742
commit 30f2df31c4
No known key found for this signature in database

View file

@ -234,12 +234,11 @@ impl SignBuilder {
} }
fn path_contains_ssh_public_key(signing_key_path: &str) -> bool { fn path_contains_ssh_public_key(signing_key_path: &str) -> bool {
std::fs::read_to_string(signing_key_path) std::fs::read_to_string(signing_key_path).ok().is_some_and(
.ok() |contents| {
.map(|contents| {
Self::looks_like_ssh_public_key(contents.trim()) Self::looks_like_ssh_public_key(contents.trim())
}) },
.unwrap_or(false) )
} }
} }