Fixed miserable emote unwrapping

This commit is contained in:
Xithrius 2023-08-03 21:37:50 -07:00
parent 1d69537097
commit e521c959ec
No known key found for this signature in database
GPG Key ID: DF6738B80C155B71

View File

@ -211,8 +211,8 @@ impl Component for ChatWidget {
area: Option<Rect>,
emotes: Option<&mut Emotes>,
) {
// TODO: Don't let this be a thing
let emotes = emotes.unwrap();
let mut default_emotes = Emotes::default();
let emotes = emotes.map_or(&mut default_emotes, |e| e);
let r = area.map_or_else(|| f.size(), |a| a);