mirror of
https://github.com/notohh/rustlings.git
synced 2024-12-18 06:58:10 -05:00
hardcode ratoml in init.rs
This commit is contained in:
parent
1f624d4c2a
commit
88e10a9e54
2 changed files with 6 additions and 6 deletions
|
@ -1,4 +0,0 @@
|
||||||
# rust-analyzer configuration file
|
|
||||||
# DO NOT edit what is already defined.
|
|
||||||
# You may add new configurations as needed.
|
|
||||||
check.extraArgs = ["--profile", "test"]
|
|
|
@ -130,8 +130,7 @@ pub fn init() -> Result<()> {
|
||||||
fs::write("Cargo.toml", updated_cargo_toml)
|
fs::write("Cargo.toml", updated_cargo_toml)
|
||||||
.context("Failed to create the file `rustlings/Cargo.toml`")?;
|
.context("Failed to create the file `rustlings/Cargo.toml`")?;
|
||||||
|
|
||||||
let ra_toml = include_str!("../dev-rust-analyzer.toml");
|
fs::write("rust-analyzer.toml", RATOML)
|
||||||
fs::write("rust-analyzer.toml", ra_toml)
|
|
||||||
.context("Failed to create the file `rustlings/rust-analyzer.toml`")?;
|
.context("Failed to create the file `rustlings/rust-analyzer.toml`")?;
|
||||||
|
|
||||||
fs::write(".gitignore", GITIGNORE)
|
fs::write(".gitignore", GITIGNORE)
|
||||||
|
@ -173,6 +172,11 @@ 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"]"#;
|
||||||
|
|
||||||
const GITIGNORE: &[u8] = b"Cargo.lock
|
const GITIGNORE: &[u8] = b"Cargo.lock
|
||||||
target/
|
target/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|
Loading…
Reference in a new issue