We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b26e609 commit 9a8740eCopy full SHA for 9a8740e
src/commands/edge_app/setting.rs
@@ -20,10 +20,7 @@ impl EdgeAppCommand {
20
setting_key: &str,
21
setting_value: &str,
22
) -> Result<(), CommandError> {
23
- let installation_id = match self.get_installation_id(path.clone()) {
24
- Ok(id) => Some(id),
25
- Err(_) => None,
26
- };
+ let installation_id = self.get_installation_id(path.clone()).ok();
27
let actual_installation_id = match installation_id {
28
Some(id) => id.clone(),
29
None => "".to_string(),
src/commands/serde_utils.rs
@@ -65,5 +65,5 @@ where
65
}
66
67
pub fn string_field_is_none_or_empty(opt: &Option<String>) -> bool {
68
- opt.as_ref().map_or(true, |s| s.is_empty())
+ opt.as_ref().is_none_or(|s| s.is_empty())
69
0 commit comments