mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-26 00:00:03 +03:00
Remove unneeded check if crates is empty
This commit is contained in:
parent
87e55ccffd
commit
f5135ae4df
|
@ -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