From 97719fe8da82a91a1919e55e1950d0997acca574 Mon Sep 17 00:00:00 2001 From: mo8it Date: Thu, 8 Aug 2024 00:20:04 +0200 Subject: [PATCH] Remove state file and solutions dir from .gitignore --- CHANGELOG.md | 5 +++-- src/dev/new.rs | 4 ++-- src/init.rs | 8 +++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 155ad843..c0143066 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ - + -## 6.1.1 (2024-08-08) +## 6.2.0 (2024-08-08) It is recommended to update to this version to fix issues with the language server `rust-analyzer`. You can update using the following two commands: @@ -12,6 +12,7 @@ cargo install rustlings - Fix `rust-analyzer` rebuilding all exercises after changing one file. - Show a helpful error message when trying to install Rustlings with a Rust version lower than the minimum one that Rustlings supports. +- Remove the state file and the solutions directory from the generated `.gitignore` file. - Run the final check of all exercises in parallel. - Small exercise improvements. - `dev check`: Check that all solutions are formatted with `rustfmt`. diff --git a/src/dev/new.rs b/src/dev/new.rs index 55d5f141..c7650465 100644 --- a/src/dev/new.rs +++ b/src/dev/new.rs @@ -76,8 +76,8 @@ pub fn new(path: &Path, no_git: bool) -> Result<()> { pub const GITIGNORE: &[u8] = b".rustlings-state.txt Cargo.lock -target -.vscode +target/ +.vscode/ !.vscode/extensions.json "; diff --git a/src/init.rs b/src/init.rs index bfa0ab86..9c7d10f4 100644 --- a/src/init.rs +++ b/src/init.rs @@ -92,11 +92,9 @@ const INIT_SOLUTION_FILE: &[u8] = b"fn main() { } "; -const GITIGNORE: &[u8] = b".rustlings-state.txt -solutions -Cargo.lock -target -.vscode +const GITIGNORE: &[u8] = b"Cargo.lock +target/ +.vscode/ "; pub const VS_CODE_EXTENSIONS_JSON: &[u8] = br#"{"recommendations":["rust-lang.rust-analyzer"]}"#;