diff --git a/apps/figcraft-cli/src/files.rs b/apps/figcraft-cli/src/files.rs index a7bddeb3b..8f277e304 100644 --- a/apps/figcraft-cli/src/files.rs +++ b/apps/figcraft-cli/src/files.rs @@ -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(); + assert_eq!(run_script(script.to_str().unwrap(), None, Some(out.to_str().unwrap())).unwrap(), ExitCode::SUCCESS); 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(); + assert_eq!(run_script(script.to_str().unwrap(), None, Some(out.to_str().unwrap())).unwrap(), ExitCode::SUCCESS); 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(); + assert_eq!(run_script(script.to_str().unwrap(), None, Some(out.to_str().unwrap())).unwrap(), ExitCode::from(1)); assert!(!out.exists(), "a script that failed writes nothing"); std::fs::remove_dir_all(dir).unwrap(); } diff --git a/crates/ui-egui/src/shortcuts.rs b/crates/ui-egui/src/shortcuts.rs index 3d312387b..1cac67b4b 100644 --- a/crates/ui-egui/src/shortcuts.rs +++ b/crates/ui-egui/src/shortcuts.rs @@ -521,10 +521,7 @@ fn key_event(app: &mut FigApp, key: Key, physical: Option, 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,