mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-21 21:42:23 -05:00
Remove the info_toml_content field
This commit is contained in:
parent
db25cc9157
commit
394ca402a8
3 changed files with 1 additions and 3 deletions
|
@ -75,7 +75,6 @@ pub fn include_files(_: TokenStream) -> TokenStream {
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
EmbeddedFiles {
|
EmbeddedFiles {
|
||||||
info_toml_content: ::std::include_str!("../info.toml"),
|
|
||||||
exercises_dir: ExercisesDir {
|
exercises_dir: ExercisesDir {
|
||||||
readme: EmbeddedFile {
|
readme: EmbeddedFile {
|
||||||
path: "exercises/README.md",
|
path: "exercises/README.md",
|
||||||
|
|
|
@ -65,7 +65,6 @@ struct ExercisesDir {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct EmbeddedFiles {
|
pub struct EmbeddedFiles {
|
||||||
pub info_toml_content: &'static str,
|
|
||||||
exercises_dir: ExercisesDir,
|
exercises_dir: ExercisesDir,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ impl InfoFile {
|
||||||
if let Ok(file_content) = fs::read_to_string("info.toml") {
|
if let Ok(file_content) = fs::read_to_string("info.toml") {
|
||||||
toml_edit::de::from_str(&file_content)
|
toml_edit::de::from_str(&file_content)
|
||||||
} else {
|
} else {
|
||||||
toml_edit::de::from_str(EMBEDDED_FILES.info_toml_content)
|
toml_edit::de::from_str(include_str!("../info.toml"))
|
||||||
}
|
}
|
||||||
.context("Failed to parse `info.toml`")
|
.context("Failed to parse `info.toml`")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue