aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2020-04-26 11:20:17 +0200
committerDaniel Schadt <kingdread@gmx.de>2020-04-26 11:20:17 +0200
commit8191ef76ce43c7592f9392171a8d1101b061d747 (patch)
tree7f51928f9b61d0fc4d6c81bc716374b7a0a0ade9
parent4e2deed7816857e5c5b56a0c6b6d59e8504f789d (diff)
downloadevtclib-8191ef76ce43c7592f9392171a8d1101b061d747.tar.gz
evtclib-8191ef76ce43c7592f9392171a8d1101b061d747.tar.bz2
evtclib-8191ef76ce43c7592f9392171a8d1101b061d747.zip
use ? instead of manual if-let
-rw-r--r--src/event.rs6
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,