Skip to content

Commit 9a8740e

Browse files
committed
Run Clippy
1 parent b26e609 commit 9a8740e

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/commands/edge_app/setting.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ impl EdgeAppCommand {
2020
setting_key: &str,
2121
setting_value: &str,
2222
) -> Result<(), CommandError> {
23-
let installation_id = match self.get_installation_id(path.clone()) {
24-
Ok(id) => Some(id),
25-
Err(_) => None,
26-
};
23+
let installation_id = self.get_installation_id(path.clone()).ok();
2724
let actual_installation_id = match installation_id {
2825
Some(id) => id.clone(),
2926
None => "".to_string(),

src/commands/serde_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ where
6565
}
6666

6767
pub fn string_field_is_none_or_empty(opt: &Option<String>) -> bool {
68-
opt.as_ref().map_or(true, |s| s.is_empty())
68+
opt.as_ref().is_none_or(|s| s.is_empty())
6969
}

0 commit comments

Comments
 (0)