Merge pull request #2090 from nyurik/mapping
Chore: Apply clippy map transformations
This commit is contained in:
commit
582da10ae2
7 changed files with 10 additions and 15 deletions
|
|
@ -97,8 +97,7 @@ where
|
|||
self.viewport.scale_factor(),
|
||||
)
|
||||
})
|
||||
.map(mouse::Cursor::Available)
|
||||
.unwrap_or(mouse::Cursor::Unavailable)
|
||||
.map_or(mouse::Cursor::Unavailable, mouse::Cursor::Available)
|
||||
}
|
||||
|
||||
/// Returns the current keyboard modifiers of the [`State`].
|
||||
|
|
|
|||
|
|
@ -17,8 +17,7 @@ impl Clipboard {
|
|||
pub fn connect(window: &winit::window::Window) -> Clipboard {
|
||||
let state = window_clipboard::Clipboard::connect(window)
|
||||
.ok()
|
||||
.map(State::Connected)
|
||||
.unwrap_or(State::Unavailable);
|
||||
.map_or(State::Unavailable, State::Connected);
|
||||
|
||||
Clipboard { state }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue