Use rustlings_dir when deleting the temporary dir before recreating it

This commit is contained in:
mo8it 2026-02-26 16:20:40 +01:00
parent 9011d34987
commit 8738518699

View File

@ -107,7 +107,7 @@ pub fn init() -> Result<()> {
} }
stdout.write_all(b"The directory `rustlings` has been added to `workspace.members` in the `Cargo.toml` file of this Cargo workspace.\n")?; stdout.write_all(b"The directory `rustlings` has been added to `workspace.members` in the `Cargo.toml` file of this Cargo workspace.\n")?;
fs::remove_dir_all("rustlings") fs::remove_dir_all(rustlings_dir)
.context("Failed to remove the temporary directory `rustlings/`")?; .context("Failed to remove the temporary directory `rustlings/`")?;
init_git = false; init_git = false;
} else { } else {