Allow processing for hints and messages in the info file

This commit is contained in:
mo8it
2026-08-01 21:21:01 +02:00
committed by Mo Bitar
parent 8560bac8e6
commit a93a10ac68
8 changed files with 44 additions and 52 deletions
+2 -10
View File
@@ -16,16 +16,8 @@ struct InfoFile<'a> {
#[proc_macro]
pub fn include_files(_: TokenStream) -> TokenStream {
// Remove `\r` on Windows
let info_file = String::from_utf8(
include_bytes!("../info.toml")
.iter()
.copied()
.filter(|c| *c != b'\r')
.collect(),
)
.expect("Failed to parse `info.toml` as UTF8");
let exercises = toml::de::from_str::<InfoFile>(&info_file)
let info_file = include_str!("../info.toml");
let exercises = toml::de::from_str::<InfoFile>(info_file)
.expect("Failed to parse `info.toml`")
.exercises;