Skip to content

Commit 448471c

Browse files
WendellXYclaude
andcommitted
fix(cli): satisfy clippy collapsible_if in confirm_delete_key
CI runs with -Dwarnings; invert the outer has_entry guard to use continue instead of nesting the if let, eliminating the collapsible_if lint. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d6e42e6 commit 448471c

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

  • langcodec-cli/src/editor

langcodec-cli/src/editor/app.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,13 @@ impl App {
386386
};
387387
let mut had_error = false;
388388
for lang in self.languages.clone() {
389-
if self.codec.has_entry(&key, &lang) {
390-
if let Err(e) = self.codec.remove_entry(&key, &lang) {
391-
self.status_message = Some((format!("Delete failed: {e}"), StatusTone::Error));
392-
had_error = true;
393-
break;
394-
}
389+
if !self.codec.has_entry(&key, &lang) {
390+
continue;
391+
}
392+
if let Err(e) = self.codec.remove_entry(&key, &lang) {
393+
self.status_message = Some((format!("Delete failed: {e}"), StatusTone::Error));
394+
had_error = true;
395+
break;
395396
}
396397
}
397398
if !had_error {

0 commit comments

Comments
 (0)