mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Cargo clippy
This commit is contained in:
@@ -97,7 +97,7 @@ impl KeyStorage for FileStorage {
|
||||
{
|
||||
Ok(mut file) => {
|
||||
// Write key to file
|
||||
if let Err(_) = file.write_all(key.as_bytes()) {
|
||||
if file.write_all(key.as_bytes()).is_err() {
|
||||
return Err(KeyStorageError::ProviderError);
|
||||
}
|
||||
// Set file to readonly
|
||||
|
||||
@@ -89,14 +89,7 @@ impl KeyStorage for KeyringStorage {
|
||||
// Check what kind of error is returned
|
||||
match storage.get_password() {
|
||||
Ok(_) => true,
|
||||
Err(err) => match err {
|
||||
KeyringError::NoBackendFound => false,
|
||||
//#[cfg(target_os = "macos")]
|
||||
//KeyringError::MacOsKeychainError(_) => false,
|
||||
//#[cfg(target_os = "windows")]
|
||||
//KeyringError::WindowsVaultError => false,
|
||||
_ => true,
|
||||
},
|
||||
Err(err) => !matches!(err, KeyringError::NoBackendFound),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user