diff options
author | 2023-09-19 01:46:46 -0400 | |
---|---|---|
committer | 2023-09-19 01:46:46 -0400 | |
commit | c997aad85d7ee6e77085e50e5e599002549d228f (patch) | |
tree | 926afdae38c6fb6c62b8c892cb61e952fcc4add1 /examples/screenshot | |
parent | 4613eb26cba3ded83f25ebdefd01c983c79a9d59 (diff) | |
download | iced-c997aad85d7ee6e77085e50e5e599002549d228f.tar.gz iced-c997aad85d7ee6e77085e50e5e599002549d228f.tar.bz2 iced-c997aad85d7ee6e77085e50e5e599002549d228f.zip |
Chore: Apply clippy map transformations
Convert `.map().unwrap_or()` to `.map_or()` and similar transformations.
Diffstat (limited to 'examples/screenshot')
-rw-r--r-- | examples/screenshot/src/main.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/screenshot/src/main.rs b/examples/screenshot/src/main.rs index 68c9d031..4dc1b051 100644 --- a/examples/screenshot/src/main.rs +++ b/examples/screenshot/src/main.rs @@ -293,10 +293,7 @@ fn numeric_input( ) -> Element<'_, Option<u32>> { text_input( placeholder, - &value - .as_ref() - .map(ToString::to_string) - .unwrap_or_else(String::new), + &value.as_ref().map_or_else(String::new, ToString::to_string), ) .on_input(move |text| { if text.is_empty() { |