summaryrefslogtreecommitdiffstats
path: root/examples/screenshot
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-10-18 17:49:19 -0500
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-10-18 17:49:19 -0500
commit54e6d2b5fa1fe29e2e3588b51f6cfff36563cefc (patch)
tree0150bba30008bafcadc8a8baca605aaaa74f9b83 /examples/screenshot
parente0233ebc3ce4791d094c52eeef81cce78b9bc578 (diff)
downloadiced-54e6d2b5fa1fe29e2e3588b51f6cfff36563cefc.tar.gz
iced-54e6d2b5fa1fe29e2e3588b51f6cfff36563cefc.tar.bz2
iced-54e6d2b5fa1fe29e2e3588b51f6cfff36563cefc.zip
Fix lint in `screenshot` example
Diffstat (limited to 'examples/screenshot')
-rw-r--r--examples/screenshot/src/main.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/screenshot/src/main.rs b/examples/screenshot/src/main.rs
index ab0a2ae3..f781a401 100644
--- a/examples/screenshot/src/main.rs
+++ b/examples/screenshot/src/main.rs
@@ -298,10 +298,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(ToString::to_string).unwrap_or_default(),
)
.on_input(move |text| {
if text.is_empty() {