Skip to content

Commit

Permalink
refactor(window): use Option in classification response
Browse files Browse the repository at this point in the history
  • Loading branch information
FineFindus committed Apr 5, 2024
1 parent 9c2fdb3 commit 284afb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ impl HieroglyphicWindow {
};

res_tx
.send_blocking(classifications.unwrap_or_default())
.send_blocking(classifications)
.expect("Failed to send classifications");
}
});

glib::spawn_future_local(glib::clone!(@weak self as window => async move {
tracing::debug!("Listening for classifications");
while let Ok(classifications) = res_rx.recv().await {
while let Ok(Some(classifications)) = res_rx.recv().await {
window.imp().stack.set_visible_child_name("symbols");
let symbols = window.symbols();
symbols.remove_all();
Expand Down

0 comments on commit 284afb7

Please sign in to comment.