Fix new clippy lints

This commit is contained in:
Guillaume Gomez 2025-05-07 17:32:31 +02:00
parent 0bdf0726cf
commit 390fc73ae7
4 changed files with 7 additions and 10 deletions

View file

@ -69,15 +69,14 @@ pub fn main_inner(profile: Profile) {
.test_dir("tests/run")
.test_path_filter(filter)
.test_extract(|path| {
let lines = std::fs::read_to_string(path)
std::fs::read_to_string(path)
.expect("read file")
.lines()
.skip_while(|l| !l.starts_with("//"))
.take_while(|l| l.starts_with("//"))
.map(|l| &l[2..])
.collect::<Vec<_>>()
.join("\n");
lines
.join("\n")
})
.test_cmds(move |path| {
// Test command 1: Compile `x.rs` into `tempdir/x`.