Revert "Chore: Apply clippy map transformations"

This reverts commit c997aad85d.
This commit is contained in:
Héctor Ramón Jiménez 2023-09-20 16:26:43 +02:00
parent 76873921af
commit b277625546
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
7 changed files with 15 additions and 10 deletions

View file

@ -200,10 +200,8 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
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 {

View file

@ -298,7 +298,10 @@ fn numeric_input(
) -> Element<'_, Option<u32>> {
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() {