Skip to content

Commit c7d8f4f

Browse files
committed
fix imports
1 parent 9d5c444 commit c7d8f4f

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

sshdconfig/src/get.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
// Licensed under the MIT License.
33

44
#[cfg(windows)]
5-
use registry_lib::{config::{Registry, RegistryValueData}, RegistryHelper};
5+
use {
6+
registry_lib::{config::{Registry, RegistryValueData}, RegistryHelper},
7+
crate::args::DefaultShell
8+
};
69

7-
use crate::args::DefaultShell;
810
use crate::error::SshdConfigError;
911

1012
/// Invoke the get command.

sshdconfig/src/set.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
// Licensed under the MIT License.
33

44
#[cfg(windows)]
5-
use registry_lib::{config::RegistryValueData, RegistryHelper};
5+
use {
6+
registry_lib::{config::RegistryValueData, RegistryHelper},
7+
crate::args::DefaultShell
8+
};
69

710
use std::path::Path;
8-
9-
use crate::args::DefaultShell;
1011
use crate::error::SshdConfigError;
1112

1213
/// Invoke the set command.
@@ -69,16 +70,18 @@ fn set_default_shell(shell: Option<String>, cmd_option: Option<String>, escape_a
6970
}
7071

7172
#[cfg(not(windows))]
72-
pub fn set_default_shell(shell: Option<String>, cmd_option: Option<String>, escape_arguments: Option<bool>, shell_arguments: Option<Vec<String>>) -> Result<(), SshdConfigError> {
73+
pub fn set_default_shell(_shell: Option<String>, _cmd_option: Option<String>, _escape_arguments: Option<bool>, _shell_arguments: Option<Vec<String>>) -> Result<(), SshdConfigError> {
7374
Err(SshdConfigError::InvalidInput("Windows registry operations not applicable to this platform".to_string()))
7475
}
7576

77+
#[cfg(windows)]
7678
fn set_registry(name: &str, data: RegistryValueData) -> Result<(), SshdConfigError> {
7779
let registry_helper = RegistryHelper::new("HKLM\\SOFTWARE\\OpenSSH", Some(name.to_string()), Some(data))?;
7880
registry_helper.set()?;
7981
Ok(())
8082
}
8183

84+
#[cfg(windows)]
8285
fn remove_registry(name: &str) -> Result<(), SshdConfigError> {
8386
let registry_helper = RegistryHelper::new("HKLM\\SOFTWARE\\OpenSSH", Some(name.to_string()), None)?;
8487
registry_helper.remove()?;

0 commit comments

Comments
 (0)