Skip to content

Commit a158c77

Browse files
committed
Add comment
1 parent 8ddbf96 commit a158c77

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/project.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ struct Crate {
2020
edition: &'static str,
2121
// Not used, but required in the JSON file.
2222
deps: Vec<()>,
23+
// Only `test` is used for all crates.
24+
// Therefore, an array is used instead of a `Vec`.
2325
cfg: [&'static str; 1],
2426
}
2527

@@ -31,7 +33,7 @@ impl RustAnalyzerProject {
3133
root_module: exercise.path,
3234
edition: "2021",
3335
deps: Vec::new(),
34-
// This allows rust_analyzer to work inside #[test] blocks
36+
// This allows rust_analyzer to work inside `#[test]` blocks
3537
cfg: ["test"],
3638
})
3739
.collect();
@@ -54,7 +56,6 @@ impl RustAnalyzerProject {
5456
let toolchain =
5557
String::from_utf8(toolchain).context("The toolchain path is invalid UTF8")?;
5658
let toolchain = toolchain.trim_end();
57-
5859
println!("Determined toolchain: {toolchain}\n");
5960

6061
let mut sysroot_src = PathBuf::with_capacity(256);

0 commit comments

Comments
 (0)