Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
lijunchen committed Sep 4, 2024
1 parent 7a42c7b commit 30c7601
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ fn get_mooncake_sources(
if xs.is_empty() {
xs.push("latest".to_string());
}
if !db.contains_key(&name) {
eprintln!("{} not found", name);
continue;
}
let mut version: Vec<String> = xs
.iter()
.map(|s| {
Expand Down
4 changes: 4 additions & 0 deletions src/mooncakesio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ impl MooncakesDB {
},
})
}

pub fn contains_key(&self, name: &str) -> bool {
self.db.contains_key(name)
}
}

#[derive(Debug, Serialize, Deserialize)]
Expand Down

0 comments on commit 30c7601

Please sign in to comment.