Skip to content

Commit 03c19f7

Browse files
committed
fix clippy
1 parent 509f6eb commit 03c19f7

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

resources/sshdconfig/src/util.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,8 @@ pub fn get_default_sshd_config_path(input: Option<PathBuf>) -> Result<PathBuf, S
110110
fn get_sshd_config_default_source_candidates() -> Vec<PathBuf> {
111111
let mut candidates: Vec<PathBuf> = Vec::new();
112112

113-
if cfg!(windows) {
114-
if let Ok(system_drive) = std::env::var("SystemDrive") {
115-
candidates.push(PathBuf::from(format!("{system_drive}\\Windows\\System32\\OpenSSH\\sshd_config_default")));
116-
}
113+
if cfg!(windows) && let Ok(system_drive) = std::env::var("SystemDrive") {
114+
candidates.push(PathBuf::from(format!("{system_drive}\\Windows\\System32\\OpenSSH\\sshd_config_default")));
117115
}
118116

119117
candidates

0 commit comments

Comments
 (0)