diff options
| author | mo8it <mo8it@proton.me> | 2024-09-13 16:38:53 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-09-13 16:38:53 +0200 |
| commit | 9459eef03214e05c4a50de3cffe250ecef095917 (patch) | |
| tree | cfbc956bc8a331c92f72eb4d39a1c3ac60ff5990 | |
| parent | 5aaa8924a659051f474584c8b7065a5c3afd9b00 (diff) | |
Use Clippy with Rust-Analyzer
| -rw-r--r-- | src/init.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/init.rs b/src/init.rs index 6322432..ce49bb6 100644 --- a/src/init.rs +++ b/src/init.rs @@ -130,7 +130,7 @@ pub fn init() -> Result<()> { fs::write("Cargo.toml", updated_cargo_toml) .context("Failed to create the file `rustlings/Cargo.toml`")?; - fs::write("rust-analyzer.toml", RATOML) + fs::write("rust-analyzer.toml", RUST_ANALYZER_TOML) .context("Failed to create the file `rustlings/rust-analyzer.toml`")?; fs::write(".gitignore", GITIGNORE) @@ -172,10 +172,9 @@ const INIT_SOLUTION_FILE: &[u8] = b"fn main() { } "; -const RATOML: &[u8] = br#"# rust-analyzer configuration file -# DO NOT edit what is already defined. -# You may add new configurations as needed. -check.extraArgs = ["--profile", "test"]"#; +pub const RUST_ANALYZER_TOML: &[u8] = br#"check.command = "clippy" +check.extraArgs = ["--profile", "test"] +"#; const GITIGNORE: &[u8] = b"Cargo.lock target/ |
