Skip to content

Commit ecf482d

Browse files
style: clippy contains() + rustfmt on /uninstall conflicting-flags suggestion
1 parent 9f2bc81 commit ecf482d

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • crates/rocm-dash-tui/src

crates/rocm-dash-tui/src/app.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,8 @@ impl AppState {
863863
// uninstall needs `/uninstall --apply` and is approval-gated (the
864864
// bin auto-adds --yes on approval).
865865
let flags: Vec<&str> = rest.split_whitespace().skip(1).collect();
866-
let saw_apply = flags.iter().any(|flag| *flag == "--apply");
867-
let saw_dry_run = flags.iter().any(|flag| *flag == "--dry-run");
866+
let saw_apply = flags.contains(&"--apply");
867+
let saw_dry_run = flags.contains(&"--dry-run");
868868
if saw_apply && saw_dry_run {
869869
self.chat.push(ChatTurn::error(
870870
"conflicting /uninstall flags: choose either --dry-run (safe) or --apply (real uninstall)"
@@ -879,7 +879,11 @@ impl AppState {
879879
};
880880
self.slash_tool = Some(rocm_cmd_request(
881881
&argv,
882-
if real { "uninstall" } else { "uninstall --dry-run" },
882+
if real {
883+
"uninstall"
884+
} else {
885+
"uninstall --dry-run"
886+
},
883887
));
884888
}
885889
}

0 commit comments

Comments
 (0)