mirror of
https://github.com/Xithrius/twitch-tui.git
synced 2024-10-04 09:07:33 +03:00
Fixed miserable emote unwrapping
This commit is contained in:
parent
1d69537097
commit
e521c959ec
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user