diff options
| author | mo8it <mo8it@proton.me> | 2024-03-25 02:35:51 +0100 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-03-25 02:35:51 +0100 |
| commit | 83cd91ccca22e36ed94e03cc622a88ef45e6da10 (patch) | |
| tree | 9783911c400da9d329628e6954be89ac832f4293 /src | |
| parent | 9c6f56b836e91da9071830d4dd4a64417fdced9d (diff) | |
Replace toml with toml_edit
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index a06f0c5..8e0029d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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(|| { |
