Skip to content

Commit 9459eef

Browse files
committed
Use Clippy with Rust-Analyzer
1 parent 5aaa892 commit 9459eef

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/init.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ pub fn init() -> Result<()> {
130130
fs::write("Cargo.toml", updated_cargo_toml)
131131
.context("Failed to create the file `rustlings/Cargo.toml`")?;
132132

133-
fs::write("rust-analyzer.toml", RATOML)
133+
fs::write("rust-analyzer.toml", RUST_ANALYZER_TOML)
134134
.context("Failed to create the file `rustlings/rust-analyzer.toml`")?;
135135

136136
fs::write(".gitignore", GITIGNORE)
@@ -172,10 +172,9 @@ const INIT_SOLUTION_FILE: &[u8] = b"fn main() {
172172
}
173173
";
174174

175-
const RATOML: &[u8] = br#"# rust-analyzer configuration file
176-
# DO NOT edit what is already defined.
177-
# You may add new configurations as needed.
178-
check.extraArgs = ["--profile", "test"]"#;
175+
pub const RUST_ANALYZER_TOML: &[u8] = br#"check.command = "clippy"
176+
check.extraArgs = ["--profile", "test"]
177+
"#;
179178

180179
const GITIGNORE: &[u8] = b"Cargo.lock
181180
target/

0 commit comments

Comments
 (0)