diff --git a/core/Cargo.toml b/core/Cargo.toml index 6d801c0..0f7b842 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -78,6 +78,7 @@ expect_used = "deny" too_many_lines = "deny" unwrap_used = "deny" wildcard_imports = "deny" +single_match_else = "deny" [dependencies] cel-interpreter = "0.10" diff --git a/core/src/bin/main.rs b/core/src/bin/main.rs index d620d78..97f54a2 100644 --- a/core/src/bin/main.rs +++ b/core/src/bin/main.rs @@ -152,13 +152,11 @@ fn run_init(dir: &Path) -> io::Result<()> { /// session directories accumulate indefinitely. `steplock clean` flushes them all. /// The next hook invocation will start each checklist fresh. fn run_clean(dir: &Path) -> io::Result<()> { - let steplock_dir = match find_repo_root_from(dir) { - Some(root) => root.join(".steplock"), - None => { - println!("steplock: no .steplock/ directory found — nothing to clean"); - return Ok(()); - } + let Some(root) = find_repo_root_from(dir) else { + println!("steplock: no .steplock/ directory found — nothing to clean"); + return Ok(()); }; + let steplock_dir = root.join(".steplock"); let sessions_dir = steplock_dir.join("sessions"); if !sessions_dir.exists() { println!("steplock: no sessions to clean");