From b27762554627b8e89f2b840b1a8a512e22d4cd87 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Sep 2023 16:26:43 +0200 Subject: Revert "Chore: Apply clippy map transformations" This reverts commit c997aad85d7ee6e77085e50e5e599002549d228f. --- examples/integration/src/main.rs | 6 ++---- examples/screenshot/src/main.rs | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/integration/src/main.rs b/examples/integration/src/main.rs index 4415fefa..c26d52fe 100644 --- a/examples/integration/src/main.rs +++ b/examples/integration/src/main.rs @@ -200,10 +200,8 @@ pub fn main() -> Result<(), Box> { viewport.scale_factor(), ) }) - .map_or( - mouse::Cursor::Unavailable, - mouse::Cursor::Available, - ), + .map(mouse::Cursor::Available) + .unwrap_or(mouse::Cursor::Unavailable), &mut renderer, &Theme::Dark, &renderer::Style { diff --git a/examples/screenshot/src/main.rs b/examples/screenshot/src/main.rs index fa06d3e9..ab0a2ae3 100644 --- a/examples/screenshot/src/main.rs +++ b/examples/screenshot/src/main.rs @@ -298,7 +298,10 @@ fn numeric_input( ) -> Element<'_, Option> { text_input( placeholder, - &value.as_ref().map_or_else(String::new, ToString::to_string), + &value + .as_ref() + .map(ToString::to_string) + .unwrap_or_else(String::new), ) .on_input(move |text| { if text.is_empty() { -- cgit