mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-21 21:42:23 -05:00
Remove unneeded check if crates is empty
This commit is contained in:
parent
87e55ccffd
commit
f5135ae4df
2 changed files with 2 additions and 4 deletions
|
@ -209,9 +209,7 @@ fn main() -> Result<()> {
|
|||
.exercises_to_json(exercises)
|
||||
.expect("Couldn't parse rustlings exercises files");
|
||||
|
||||
if project.crates.is_empty() {
|
||||
println!("Failed find any exercises, make sure you're in the `rustlings` folder");
|
||||
} else if project.write_to_disk().is_err() {
|
||||
if project.write_to_disk().is_err() {
|
||||
println!("Failed to write rust-project.json to disk for rust-analyzer");
|
||||
} else {
|
||||
println!("Successfully generated rust-project.json");
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::exercise::Exercise;
|
|||
#[derive(Serialize, Deserialize)]
|
||||
pub struct RustAnalyzerProject {
|
||||
sysroot_src: String,
|
||||
pub crates: Vec<Crate>,
|
||||
crates: Vec<Crate>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
|
|
Loading…
Reference in a new issue