Skip to content

Commit

Permalink
fix(iced-sctk): replace panic with handling for remaining enum variants
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Oct 16, 2023
1 parent 9fafd18 commit 724dd4f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sctk/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1990,9 +1990,10 @@ where

current_cache = user_interface.into_cache();
*cache = current_cache;
return ret.map(|o| match *o {
OperationWrapper::Message(o) => command::Action::Widget(o),
_ => unimplemented!()
return ret.and_then(|o| match *o {
OperationWrapper::Message(o) => Some(command::Action::Widget(o)),
OperationWrapper::Id(o) => Some(command::Action::Widget(o)),

Check failure on line 1995 in sctk/src/application.rs

View workflow job for this annotation

GitHub Actions / all

mismatched types

Check failure on line 1995 in sctk/src/application.rs

View workflow job for this annotation

GitHub Actions / native (ubuntu-latest, stable)

mismatched types

Check failure on line 1995 in sctk/src/application.rs

View workflow job for this annotation

GitHub Actions / native (ubuntu-latest, beta)

mismatched types
_ => None
});
}
command::Action::PlatformSpecific(
Expand Down

0 comments on commit 724dd4f

Please sign in to comment.