mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-22 05:52:23 -05:00
Add comment
This commit is contained in:
parent
8ddbf9635d
commit
a158c77d81
1 changed files with 3 additions and 2 deletions
|
@ -20,6 +20,8 @@ struct Crate {
|
||||||
edition: &'static str,
|
edition: &'static str,
|
||||||
// Not used, but required in the JSON file.
|
// Not used, but required in the JSON file.
|
||||||
deps: Vec<()>,
|
deps: Vec<()>,
|
||||||
|
// Only `test` is used for all crates.
|
||||||
|
// Therefore, an array is used instead of a `Vec`.
|
||||||
cfg: [&'static str; 1],
|
cfg: [&'static str; 1],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +33,7 @@ impl RustAnalyzerProject {
|
||||||
root_module: exercise.path,
|
root_module: exercise.path,
|
||||||
edition: "2021",
|
edition: "2021",
|
||||||
deps: Vec::new(),
|
deps: Vec::new(),
|
||||||
// This allows rust_analyzer to work inside #[test] blocks
|
// This allows rust_analyzer to work inside `#[test]` blocks
|
||||||
cfg: ["test"],
|
cfg: ["test"],
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
@ -54,7 +56,6 @@ impl RustAnalyzerProject {
|
||||||
let toolchain =
|
let toolchain =
|
||||||
String::from_utf8(toolchain).context("The toolchain path is invalid UTF8")?;
|
String::from_utf8(toolchain).context("The toolchain path is invalid UTF8")?;
|
||||||
let toolchain = toolchain.trim_end();
|
let toolchain = toolchain.trim_end();
|
||||||
|
|
||||||
println!("Determined toolchain: {toolchain}\n");
|
println!("Determined toolchain: {toolchain}\n");
|
||||||
|
|
||||||
let mut sysroot_src = PathBuf::with_capacity(256);
|
let mut sysroot_src = PathBuf::with_capacity(256);
|
||||||
|
|
Loading…
Reference in a new issue