Skip to content

Commit b8c86dd

Browse files
committed
removing todos
1 parent 8f042dc commit b8c86dd

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

test/src/snapshot/mod.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ fn run_cmds(
312312
let _ = writeln!(snapshot, "{}", last_output.unwrap_or_default());
313313
}
314314
toml::Value::Table(map) => {
315-
let ty = map["repeat"].as_str().unwrap();
315+
let repeat_type = map["repeat"].as_str().unwrap();
316316
let cmds = map["cmds"].as_array().unwrap();
317317

318-
match ty {
318+
match repeat_type {
319319
"for-each-block" => {
320320
fn remove_block_from_file(contents: &str, block_name: &str) -> String {
321321
let block_regex = Regex::new(&format!("\\/\\* START {block_name} \\*\\/[.\\s\\S]+?END {block_name} \\*\\/")).unwrap();
@@ -354,10 +354,14 @@ fn run_cmds(
354354
let _ = run_cmds(test_name, repo_root, root, cmds, snapshot);
355355
}
356356
}
357-
_ => todo!(),
357+
_ => {
358+
panic!("`{cmd}` is not a supported repeat type.\nPossible types are: for-each-block.");
359+
},
358360
}
359361
}
360-
_ => todo!(),
362+
_ => {
363+
panic!("`cmds` items can only be strings or inline tables.");
364+
},
361365
}
362366
}
363367

0 commit comments

Comments
 (0)