Skip to content

Commit

Permalink
chore: add panic for shit code
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Aug 14, 2024
1 parent e207025 commit b5e3b6a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lala_bar/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,13 @@ impl MultiApplication for LalaMusicBar {
return Some(LaLaInfo::Notify(Box::new(info.clone())));
}
let notify_id = self.showned_notifications.get(&id)?;
self.notifications
.get(notify_id)
.cloned()
.map(|notifyw| LaLaInfo::Notify(Box::new(notifyw)))
Some(
self.notifications
.get(notify_id)
.cloned()
.map(|notifyw| LaLaInfo::Notify(Box::new(notifyw)))
.expect(format!("it should can be found, {notify_id} is missing, please check the code!!").as_str()),
)
}
}

Expand Down

0 comments on commit b5e3b6a

Please sign in to comment.