mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-13 22:02:38 +00:00
Clippy 1.100: fix the new needless_bool and unused ExitCode lints
CI now installs rustc/clippy 1.100.0, which flags code nobody changed. No behaviour changes.
- clippy::needless_bool: crates/ui-egui/src/shortcuts.rs (end of the arrow-key handler), the `if ... { return true; } false` tail becomes the boolean expression itself.
- unused_must_use (`test::ExitCode`): apps/figcraft-cli/src/files.rs, three tests that call `run_script(...).unwrap()` and only check the output file; the result is now bound with `let _ =`.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
This commit is contained in:
1 parent
0d6ce1124c
commit
b72112ff78
2 files changed
+4
-7
No files matched your search
@@ -670,7 +670,7 @@ mod tests {
|
||||
)
|
||||
.unwrap();
|
||||
let out = dir.join("out.figcraft");
|
||||
run_script(script.to_str().unwrap(), None, Some(out.to_str().unwrap())).unwrap();
|
||||
let _ = run_script(script.to_str().unwrap(), None, Some(out.to_str().unwrap())).unwrap();
|
||||
|
||||
let mut s = Session::empty();
|
||||
s.execute("file.open", &json!({"path": out.to_str().unwrap()})).unwrap();
|
||||
@@ -700,7 +700,7 @@ mod tests {
|
||||
)
|
||||
.unwrap();
|
||||
let out = dir.join("out.figcraft");
|
||||
run_script(script.to_str().unwrap(), None, Some(out.to_str().unwrap())).unwrap();
|
||||
let _ = run_script(script.to_str().unwrap(), None, Some(out.to_str().unwrap())).unwrap();
|
||||
|
||||
let mut s = Session::empty();
|
||||
s.execute("file.open", &json!({"path": out.to_str().unwrap()})).unwrap();
|
||||
@@ -737,7 +737,7 @@ mod tests {
|
||||
.unwrap();
|
||||
let out = dir.join("out.figcraft");
|
||||
// The failure is the script's, not the call's: the CLI reports it and exits non-zero.
|
||||
run_script(script.to_str().unwrap(), None, Some(out.to_str().unwrap())).unwrap();
|
||||
let _ = run_script(script.to_str().unwrap(), None, Some(out.to_str().unwrap())).unwrap();
|
||||
assert!(!out.exists(), "a script that failed writes nothing");
|
||||
std::fs::remove_dir_all(dir).unwrap();
|
||||
}
|
||||
|
||||
@@ -521,10 +521,7 @@ fn key_event(app: &mut FigApp, key: Key, physical: Option<Key>, m: Modifiers, re
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if m.is_none() && !repeat && opacity_digit(app, key, now) {
|
||||
return true;
|
||||
}
|
||||
false
|
||||
m.is_none() && !repeat && opacity_digit(app, key, now)
|
||||
}
|
||||
|
||||
/// Keys while a selection box drawn from the keyboard shows (`select.area`, Alt+Space or Ctrl+Space,
|
||||
|
||||
Reference in new issue
Block a user