mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Clippy
This commit is contained in:
@@ -83,11 +83,8 @@ impl AuthActivity {
|
||||
.view
|
||||
.get_value(super::COMPONENT_RADIO_BOOKMARK_SAVE_PWD)
|
||||
{
|
||||
Some(Payload::Unsigned(choice)) => match choice {
|
||||
0 => Some(password), // Yes
|
||||
_ => None, // No
|
||||
},
|
||||
_ => None, // No such component
|
||||
Some(Payload::Unsigned(0)) => Some(password), // Yes
|
||||
_ => None, // No such component / No
|
||||
},
|
||||
false => None,
|
||||
};
|
||||
|
||||
@@ -274,14 +274,10 @@ impl AuthActivity {
|
||||
Some(Payload::Text(s)) => s,
|
||||
_ => String::new(),
|
||||
};
|
||||
let save_pwd: bool =
|
||||
match self.view.get_value(COMPONENT_RADIO_BOOKMARK_SAVE_PWD) {
|
||||
Some(Payload::Unsigned(idx)) => match idx {
|
||||
0 => true,
|
||||
_ => false,
|
||||
},
|
||||
_ => false,
|
||||
};
|
||||
let save_pwd: bool = matches!(
|
||||
self.view.get_value(COMPONENT_RADIO_BOOKMARK_SAVE_PWD),
|
||||
Some(Payload::Unsigned(0))
|
||||
);
|
||||
// Save bookmark
|
||||
self.save_bookmark(bookmark_name, save_pwd);
|
||||
// Umount popup
|
||||
|
||||
Reference in New Issue
Block a user