From 2b51554ff59d1e5cbf8dd2db65d278b0202a9102 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 27 Jun 2026 03:52:05 +0900 Subject: refactor: fix compiler warnings and clippy warnings --- .../src/composer/ca_bundle/ca_bundle.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'crates/shirabe-external-packages/src/composer/ca_bundle/ca_bundle.rs') diff --git a/crates/shirabe-external-packages/src/composer/ca_bundle/ca_bundle.rs b/crates/shirabe-external-packages/src/composer/ca_bundle/ca_bundle.rs index 187950a..3c372cb 100644 --- a/crates/shirabe-external-packages/src/composer/ca_bundle/ca_bundle.rs +++ b/crates/shirabe-external-packages/src/composer/ca_bundle/ca_bundle.rs @@ -23,10 +23,10 @@ impl CaBundle { // not consult OpenSSL's default cert locations, does not validate the // candidate before returning it, and has no bundled cacert.pem fallback. pub fn get_system_ca_root_bundle_path(_logger: ()) -> String { - if let Ok(file) = std::env::var("SSL_CERT_FILE") { - if std::path::Path::new(&file).is_file() { - return file; - } + if let Ok(file) = std::env::var("SSL_CERT_FILE") + && std::path::Path::new(&file).is_file() + { + return file; } const CA_FILE_PATHS: &[&str] = &[ @@ -49,10 +49,10 @@ impl CaBundle { } } - if let Ok(dir) = std::env::var("SSL_CERT_DIR") { - if std::path::Path::new(&dir).is_dir() { - return dir; - } + if let Ok(dir) = std::env::var("SSL_CERT_DIR") + && std::path::Path::new(&dir).is_dir() + { + return dir; } const CA_DIR_PATHS: &[&str] = &["/etc/pki/tls/certs", "/etc/ssl/certs"]; -- cgit v1.3.1