From 8738518699ac4eb9b010d28a342108a0ac0707a4 Mon Sep 17 00:00:00 2001 From: mo8it Date: Thu, 26 Feb 2026 16:20:40 +0100 Subject: [PATCH] Use `rustlings_dir` when deleting the temporary dir before recreating it --- src/init.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.rs b/src/init.rs index 9ef211e1..971b0e51 100644 --- a/src/init.rs +++ b/src/init.rs @@ -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")?; - fs::remove_dir_all("rustlings") + fs::remove_dir_all(rustlings_dir) .context("Failed to remove the temporary directory `rustlings/`")?; init_git = false; } else {