diff options
author | 2022-07-09 18:42:41 +0200 | |
---|---|---|
committer | 2022-07-09 18:43:05 +0200 | |
commit | 2065a40f642589134142a740ff4198deaa4c378b (patch) | |
tree | 00477d6d7cb571332062535557151d5b031d8925 /examples/stopwatch | |
parent | d53cc5498b92fb6b573867f5ccb5f8ac93f6be79 (diff) | |
download | iced-2065a40f642589134142a740ff4198deaa4c378b.tar.gz iced-2065a40f642589134142a740ff4198deaa4c378b.tar.bz2 iced-2065a40f642589134142a740ff4198deaa4c378b.zip |
Fix `clippy` lints for all crates and features
... and check those in CI as well!
Diffstat (limited to 'examples/stopwatch')
-rw-r--r-- | examples/stopwatch/src/main.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/stopwatch/src/main.rs b/examples/stopwatch/src/main.rs index b83b92ec..b7c816ff 100644 --- a/examples/stopwatch/src/main.rs +++ b/examples/stopwatch/src/main.rs @@ -67,13 +67,12 @@ impl Application for Stopwatch { self.state = State::Idle; } }, - Message::Tick(now) => match &mut self.state { - State::Ticking { last_tick } => { + Message::Tick(now) => { + if let State::Ticking { last_tick } = &mut self.state { self.duration += now - *last_tick; *last_tick = now; } - _ => {} - }, + } Message::Reset => { self.duration = Duration::default(); } |