Typo in system

This commit is contained in:
ChristianVisintin
2020-12-25 11:43:32 +01:00
parent 76c4f1b67f
commit 264b5afad6
2 changed files with 4 additions and 4 deletions

View File

@@ -109,7 +109,7 @@ impl ConfigClient {
/// ### get_default_protocol
///
/// Get default protocol from configuration
pub fn get_default_protcol(&self) -> FileTransferProtocol {
pub fn get_default_protocol(&self) -> FileTransferProtocol {
match FileTransferProtocol::from_str(self.config.user_interface.default_protocol.as_str()) {
Ok(p) => p,
Err(_) => FileTransferProtocol::Sftp,
@@ -348,7 +348,7 @@ mod tests {
.ok()
.unwrap();
// Verify client has updated parameters
assert_eq!(client.get_default_protcol(), FileTransferProtocol::Scp);
assert_eq!(client.get_default_protocol(), FileTransferProtocol::Scp);
assert_eq!(client.get_text_editor(), PathBuf::from("/usr/bin/vim"));
let mut expected_key_path: PathBuf = key_path.clone();
expected_key_path.push("pi@192.168.1.31.key");
@@ -382,7 +382,7 @@ mod tests {
.unwrap();
client.set_default_protocol(FileTransferProtocol::Ftp(true));
assert_eq!(
client.get_default_protcol(),
client.get_default_protocol(),
FileTransferProtocol::Ftp(true)
);
}

View File

@@ -176,7 +176,7 @@ impl AuthActivity {
match ConfigClient::new(config_path.as_path(), ssh_dir.as_path()) {
Ok(cli) => {
// Set default protocol
self.protocol = cli.get_default_protcol();
self.protocol = cli.get_default_protocol();
// Set client
self.config_client = Some(cli);
}