mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-25 00:00:05 +03:00
Fix exercise name shift in exercise check
This commit is contained in:
parent
13124aafe3
commit
bdf4960b6a
|
@ -175,22 +175,21 @@ fn check_exercises_unsolved(info_file: &InfoFile, cmd_runner: &CmdRunner) -> Res
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
Some(s.spawn(|| exercise_info.run_exercise(None, cmd_runner)))
|
Some((
|
||||||
|
exercise_info.name.as_str(),
|
||||||
|
s.spawn(|| exercise_info.run_exercise(None, cmd_runner)),
|
||||||
|
))
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
for (exercise_info, handle) in info_file.exercises.iter().zip(handles) {
|
for (exercise_name, handle) in handles {
|
||||||
let Ok(result) = handle.join() else {
|
let Ok(result) = handle.join() else {
|
||||||
bail!(
|
bail!("Panic while trying to run the exericse {exercise_name}");
|
||||||
"Panic while trying to run the exericse {}",
|
|
||||||
exercise_info.name,
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
Ok(true) => bail!(
|
Ok(true) => bail!(
|
||||||
"The exercise {} is already solved.\n{SKIP_CHECK_UNSOLVED_HINT}",
|
"The exercise {exercise_name} is already solved.\n{SKIP_CHECK_UNSOLVED_HINT}",
|
||||||
exercise_info.name,
|
|
||||||
),
|
),
|
||||||
Ok(false) => (),
|
Ok(false) => (),
|
||||||
Err(e) => return Err(e),
|
Err(e) => return Err(e),
|
||||||
|
|
Loading…
Reference in a new issue