Skip to content

Commit

Permalink
fix crash in local development environment caused by missing key
Browse files Browse the repository at this point in the history
  • Loading branch information
szabgab committed Mar 26, 2024
1 parent 0fc7969 commit df80cf9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,14 @@ pub fn generate_user_pages(
Some(crate_ids) => {
//dbg!(crate_ids);
for crate_id in crate_ids {
//dbg!(&crate_id);
log::info!("crated_id: {}", &crate_id);
//log::info!("crate_by_id: {:#?}", crate_by_id);
//log::info!("crate_by_id: {:#?}", crate_by_id.keys());
//dbg!(&crate_by_id[crate_id.as_str()]);
//dbg!(&crate_by_id.get(&crate_id.clone()));
selected_crates.push(crate_by_id[crate_id.as_str()]);
if crate_by_id.contains_key(crate_id.as_str()) {
selected_crates.push(crate_by_id[crate_id.as_str()]);
}
}
user.count = selected_crates.len() as u16;
//users_with_crates.push(user);
Expand Down

0 comments on commit df80cf9

Please sign in to comment.