mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-09 20:29:18 +00:00
Remove default run
This commit is contained in:
parent
27c1be0e4e
commit
aba47a5c96
@ -3,7 +3,6 @@ name = "rustlings"
|
||||
version = "4.6.0"
|
||||
authors = ["anastasie <ana@ana.st>", "Carol (Nichols || Goulding) <carol.nichols@gmail.com>"]
|
||||
edition = "2021"
|
||||
default-run = "rustlings"
|
||||
|
||||
[dependencies]
|
||||
argh = "0.1.4"
|
||||
|
||||
@ -32,6 +32,15 @@ impl RustAnalyzerProject {
|
||||
}
|
||||
}
|
||||
|
||||
/// Write rust-project.json to disk
|
||||
pub fn write_to_disk(&self) -> Result<(), std::io::Error> {
|
||||
std::fs::write(
|
||||
"./rust-project.json",
|
||||
serde_json::to_vec(&self).expect("Failed to serialize to JSON"),
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// If path contains .rs extension, add a crate to `rust-project.json`
|
||||
fn path_to_json(&mut self, path: String) {
|
||||
if let Some((_, ext)) = path.split_once(".") {
|
||||
@ -45,15 +54,6 @@ impl RustAnalyzerProject {
|
||||
}
|
||||
}
|
||||
|
||||
/// Write rust-project.json to disk
|
||||
pub fn write_to_disk(&self) -> Result<(), std::io::Error> {
|
||||
std::fs::write(
|
||||
"./rust-project.json",
|
||||
serde_json::to_vec(&self).expect("Failed to serialize to JSON"),
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Parse the exercises folder for .rs files, any matches will create
|
||||
/// a new `crate` in rust-project.json which allows rust-analyzer to
|
||||
/// treat it like a normal binary
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user