1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-06-15 00:04:58 +02:00

Refactor embedded files to add solutions

This commit is contained in:
mo8it
2024-04-23 19:18:25 +02:00
parent e5a19a4c33
commit 2dac8e509b
105 changed files with 198 additions and 158 deletions

View File

@ -24,11 +24,11 @@ pub fn init() -> Result<()> {
set_current_dir("rustlings")
.context("Failed to change the current directory to `rustlings`")?;
let info_file = InfoFile::parse()?;
EMBEDDED_FILES
.init_exercises_dir()
.init_exercises_dir(&info_file.exercises)
.context("Failed to initialize the `rustlings/exercises` directory")?;
let info_file = InfoFile::parse()?;
let current_cargo_toml = include_str!("../dev/Cargo.toml");
// Skip the first line (comment).
let newline_ind = current_cargo_toml