diff --git a/src/dispatching/update_listeners.rs b/src/dispatching/update_listeners.rs index 602e8c19..c6dc3e6a 100644 --- a/src/dispatching/update_listeners.rs +++ b/src/dispatching/update_listeners.rs @@ -219,6 +219,7 @@ where // Updates fetched last time. // // We need to store them here so we can drop stream without loosing state. + #[allow(clippy::type_complexity)] fetched: Option< iter::Map< iter::FilterMap< @@ -402,7 +403,9 @@ where Thf: Fn(&St) -> Option<Duration>, { fn stop(&mut self) { - self.stop.take().map(|stop| stop(&mut self.state)); + if let Some(stop) = self.stop.take() { + stop(&mut self.state) + } } fn timeout_hint(&self) -> Option<Duration> { diff --git a/src/lib.rs b/src/lib.rs index 7079bbce..a22f0731 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -54,6 +54,7 @@ // $ RUSTDOCFLAGS="--cfg docsrs -Znormalize-docs" cargo +nightly doc --open --all-features // ``` #![cfg_attr(all(docsrs, feature = "nightly"), feature(doc_cfg))] +#![allow(clippy::redundant_pattern_matching)] pub use dispatching::repls::{ commands_repl, commands_repl_with_listener, dialogues_repl, dialogues_repl_with_listener, repl,