diff options
Diffstat (limited to '')
| -rw-r--r-- | runtime/src/command.rs | 6 | ||||
| -rw-r--r-- | runtime/src/debug/basic.rs | 20 | ||||
| -rw-r--r-- | runtime/src/lib.rs | 5 | ||||
| -rw-r--r-- | runtime/src/overlay/nested.rs | 2 | ||||
| -rw-r--r-- | runtime/src/program/state.rs | 2 | ||||
| -rw-r--r-- | runtime/src/window/screenshot.rs | 2 | 
6 files changed, 13 insertions, 24 deletions
| diff --git a/runtime/src/command.rs b/runtime/src/command.rs index cd4c51ff..b74097bd 100644 --- a/runtime/src/command.rs +++ b/runtime/src/command.rs @@ -40,9 +40,9 @@ impl<T> Command<T> {      /// Creates a [`Command`] that performs the action of the given future.      pub fn perform<A>( -        future: impl Future<Output = T> + 'static + MaybeSend, -        f: impl FnOnce(T) -> A + 'static + MaybeSend, -    ) -> Command<A> { +        future: impl Future<Output = A> + 'static + MaybeSend, +        f: impl FnOnce(A) -> T + 'static + MaybeSend, +    ) -> Command<T> {          use iced_futures::futures::FutureExt;          Command::single(Action::Future(Box::pin(future.map(f)))) diff --git a/runtime/src/debug/basic.rs b/runtime/src/debug/basic.rs index 32f725a1..4c994a2f 100644 --- a/runtime/src/debug/basic.rs +++ b/runtime/src/debug/basic.rs @@ -75,7 +75,7 @@ impl Debug {      }      pub fn startup_finished(&mut self) { -        self.startup_duration = time::Instant::now() - self.startup_start; +        self.startup_duration = self.startup_start.elapsed();      }      pub fn update_started(&mut self) { @@ -83,8 +83,7 @@ impl Debug {      }      pub fn update_finished(&mut self) { -        self.update_durations -            .push(time::Instant::now() - self.update_start); +        self.update_durations.push(self.update_start.elapsed());      }      pub fn view_started(&mut self) { @@ -92,8 +91,7 @@ impl Debug {      }      pub fn view_finished(&mut self) { -        self.view_durations -            .push(time::Instant::now() - self.view_start); +        self.view_durations.push(self.view_start.elapsed());      }      pub fn layout_started(&mut self) { @@ -101,8 +99,7 @@ impl Debug {      }      pub fn layout_finished(&mut self) { -        self.layout_durations -            .push(time::Instant::now() - self.layout_start); +        self.layout_durations.push(self.layout_start.elapsed());      }      pub fn event_processing_started(&mut self) { @@ -110,8 +107,7 @@ impl Debug {      }      pub fn event_processing_finished(&mut self) { -        self.event_durations -            .push(time::Instant::now() - self.event_start); +        self.event_durations.push(self.event_start.elapsed());      }      pub fn draw_started(&mut self) { @@ -119,8 +115,7 @@ impl Debug {      }      pub fn draw_finished(&mut self) { -        self.draw_durations -            .push(time::Instant::now() - self.draw_start); +        self.draw_durations.push(self.draw_start.elapsed());      }      pub fn render_started(&mut self) { @@ -128,8 +123,7 @@ impl Debug {      }      pub fn render_finished(&mut self) { -        self.render_durations -            .push(time::Instant::now() - self.render_start); +        self.render_durations.push(self.render_start.elapsed());      }      pub fn log_message<Message: std::fmt::Debug>(&mut self, message: &Message) { diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index c3261cca..29e94d65 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -13,11 +13,6 @@      missing_debug_implementations,      missing_docs,      unused_results, -    clippy::extra_unused_lifetimes, -    clippy::from_over_into, -    clippy::needless_borrow, -    clippy::new_without_default, -    clippy::useless_conversion,      rustdoc::broken_intra_doc_links  )]  #![cfg_attr(docsrs, feature(doc_auto_cfg))] diff --git a/runtime/src/overlay/nested.rs b/runtime/src/overlay/nested.rs index 21b6f7c1..062ccc72 100644 --- a/runtime/src/overlay/nested.rs +++ b/runtime/src/overlay/nested.rs @@ -164,7 +164,7 @@ where              }          } -        recurse(&mut self.overlay, layout, renderer, operation) +        recurse(&mut self.overlay, layout, renderer, operation);      }      /// Processes a runtime [`Event`]. diff --git a/runtime/src/program/state.rs b/runtime/src/program/state.rs index 9aa2d550..6f8f4063 100644 --- a/runtime/src/program/state.rs +++ b/runtime/src/program/state.rs @@ -200,7 +200,7 @@ where                  match operation.finish() {                      operation::Outcome::None => {}                      operation::Outcome::Some(message) => { -                        self.queued_messages.push(message) +                        self.queued_messages.push(message);                      }                      operation::Outcome::Chain(next) => {                          current_operation = Some(next); diff --git a/runtime/src/window/screenshot.rs b/runtime/src/window/screenshot.rs index c84286b6..21e04718 100644 --- a/runtime/src/window/screenshot.rs +++ b/runtime/src/window/screenshot.rs @@ -6,7 +6,7 @@ use std::sync::Arc;  /// Data of a screenshot, captured with `window::screenshot()`.  /// -/// The `bytes` of this screenshot will always be ordered as `RGBA` in the sRGB color space. +/// The `bytes` of this screenshot will always be ordered as `RGBA` in the `sRGB` color space.  #[derive(Clone)]  pub struct Screenshot {      /// The bytes of the [`Screenshot`]. | 
