1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-06-17 00:07:35 +02:00

Replace toml with toml_edit

This commit is contained in:
mo8it
2024-03-25 02:35:51 +01:00
parent 9c6f56b836
commit 83cd91ccca
3 changed files with 8 additions and 18 deletions

View File

@ -107,8 +107,10 @@ fn main() {
std::process::exit(1);
}
let toml_str = &fs::read_to_string("info.toml").unwrap();
let exercises = toml::from_str::<ExerciseList>(toml_str).unwrap().exercises;
let info_file = fs::read_to_string("info.toml").unwrap();
let exercises = toml_edit::de::from_str::<ExerciseList>(&info_file)
.unwrap()
.exercises;
let verbose = args.nocapture;
let command = args.command.unwrap_or_else(|| {