diff --git a/Cargo.lock b/Cargo.lock index 3950c476..52b27259 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -536,7 +536,7 @@ dependencies = [ "regex", "serde", "serde_json", - "toml", + "toml_edit", ] [[package]] @@ -617,18 +617,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" -[[package]] -name = "toml" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - [[package]] name = "toml_datetime" version = "0.6.5" @@ -640,9 +628,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.6" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" dependencies = [ "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index 218b7990..28614595 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ notify-debouncer-mini = "0.4.1" regex = "1.10.3" serde_json = "1.0.114" serde = { version = "1.0.197", features = ["derive"] } -toml = "0.8.10" +toml_edit = { version = "0.22.9", default-features = false, features = ["parse", "serde"] } [[bin]] name = "rustlings" diff --git a/src/main.rs b/src/main.rs index a06f0c56..8e0029dd 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::(toml_str).unwrap().exercises; + let info_file = fs::read_to_string("info.toml").unwrap(); + let exercises = toml_edit::de::from_str::(&info_file) + .unwrap() + .exercises; let verbose = args.nocapture; let command = args.command.unwrap_or_else(|| {