This commit is contained in:
veeso
2021-03-27 12:17:35 +01:00
parent 67e36fa38f
commit 55e884889c
16 changed files with 64 additions and 156 deletions

View File

@@ -342,10 +342,7 @@ impl BookmarksClient {
port,
username,
protocol: protocol.to_string(),
password: match password {
Some(p) => Some(self.encrypt_str(p.as_str())), // Encrypt password if provided
None => None,
},
password: password.map(|p| self.encrypt_str(p.as_str())),
}
}

View File

@@ -173,10 +173,7 @@ impl ConfigClient {
/// Set value for group_dir in configuration.
/// Provided value, if `Some` will be converted to `GroupDirs`
pub fn set_group_dirs(&mut self, val: Option<GroupDirs>) {
self.config.user_interface.group_dirs = match val {
None => None,
Some(val) => Some(val.to_string()),
};
self.config.user_interface.group_dirs = val.map(|val| val.to_string());
}
/// ### get_file_fmt