diff options
author | Daniel Schadt <kingdread@gmx.de> | 2020-04-26 11:20:17 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2020-04-26 11:20:17 +0200 |
commit | 8191ef76ce43c7592f9392171a8d1101b061d747 (patch) | |
tree | 7f51928f9b61d0fc4d6c81bc716374b7a0a0ade9 /src/event.rs | |
parent | 4e2deed7816857e5c5b56a0c6b6d59e8504f789d (diff) | |
download | evtclib-8191ef76ce43c7592f9392171a8d1101b061d747.tar.gz evtclib-8191ef76ce43c7592f9392171a8d1101b061d747.tar.bz2 evtclib-8191ef76ce43c7592f9392171a8d1101b061d747.zip |
use ? instead of manual if-let
Diffstat (limited to 'src/event.rs')
-rw-r--r-- | src/event.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/event.rs b/src/event.rs index 558985e..71effba 100644 --- a/src/event.rs +++ b/src/event.rs @@ -219,11 +219,7 @@ impl Event { return None } - CbtStateChange::None => if let Some(kind) = check_activation(raw_event) { - kind - } else { - return None; - }, + CbtStateChange::None => check_activation(raw_event)?, }; Some(Event { time: raw_event.time, |