diff options
| author | mo8it <mo8it@proton.me> | 2024-05-13 01:25:38 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-05-13 01:25:38 +0200 |
| commit | 11fda5d70f568e0f528d91dd573447719abe05f4 (patch) | |
| tree | 683a2d1a8f807ea40908ef6c7a61c962e71d1d8b /rustlings-macros/src | |
| parent | d9df809838191962a82e98ff01aaaa73950ba670 (diff) | |
Move info.toml to rustlings-macros/
This improves the experience for contributors on Windows becuase
Windows can't deal with git symbolic links out of the box…
Diffstat (limited to 'rustlings-macros/src')
| -rw-r--r-- | rustlings-macros/src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rustlings-macros/src/lib.rs b/rustlings-macros/src/lib.rs index 4417a4f..6c6067b 100644 --- a/rustlings-macros/src/lib.rs +++ b/rustlings-macros/src/lib.rs @@ -15,7 +15,8 @@ struct InfoFile { #[proc_macro] pub fn include_files(_: TokenStream) -> TokenStream { - let exercises = toml_edit::de::from_str::<InfoFile>(include_str!("../info.toml")) + let info_file = include_str!("../info.toml"); + let exercises = toml_edit::de::from_str::<InfoFile>(info_file) .expect("Failed to parse `info.toml`") .exercises; @@ -46,6 +47,7 @@ pub fn include_files(_: TokenStream) -> TokenStream { quote! { EmbeddedFiles { + info_file: #info_file, exercise_files: &[#(ExerciseFiles { exercise: include_bytes!(#exercise_files), solution: include_bytes!(#solution_files), dir_ind: #dir_inds }),*], exercise_dirs: &[#(ExerciseDir { name: #dirs, readme: include_bytes!(#readmes) }),*] } |
