clippy: cleanup
This commit is contained in:
@@ -14,6 +14,7 @@ impl Default for Joint {
|
||||
}
|
||||
}
|
||||
}
|
||||
#[allow(clippy::derivable_impls)]
|
||||
impl Default for Finger {
|
||||
fn default() -> Self {
|
||||
Finger {
|
||||
@@ -25,6 +26,7 @@ impl Default for Finger {
|
||||
}
|
||||
}
|
||||
}
|
||||
#[allow(clippy::derivable_impls)]
|
||||
impl Default for Thumb {
|
||||
fn default() -> Self {
|
||||
Thumb {
|
||||
@@ -35,6 +37,7 @@ impl Default for Thumb {
|
||||
}
|
||||
}
|
||||
}
|
||||
#[allow(clippy::derivable_impls)]
|
||||
impl Default for Hand {
|
||||
fn default() -> Self {
|
||||
Hand {
|
||||
|
||||
@@ -140,7 +140,7 @@ impl MousePointer {
|
||||
});
|
||||
let valid =
|
||||
result.deepest_point_distance > 0.0 && result.min_distance.is_sign_negative();
|
||||
valid.then(|| result.deepest_point_distance)
|
||||
valid.then_some(result.deepest_point_distance)
|
||||
};
|
||||
|
||||
self.capture_manager.update_capture(&self.pointer);
|
||||
|
||||
@@ -35,20 +35,12 @@ impl WlSurfaceExt for WlSurface {
|
||||
}
|
||||
fn get_current_surface_state(&self) -> SurfaceCachedState {
|
||||
compositor::with_states(self, |states| {
|
||||
states
|
||||
.cached_state
|
||||
.get::<SurfaceCachedState>()
|
||||
.current()
|
||||
.clone()
|
||||
*states.cached_state.get::<SurfaceCachedState>().current()
|
||||
})
|
||||
}
|
||||
fn get_pending_surface_state(&self) -> SurfaceCachedState {
|
||||
compositor::with_states(self, |states| {
|
||||
states
|
||||
.cached_state
|
||||
.get::<SurfaceCachedState>()
|
||||
.pending()
|
||||
.clone()
|
||||
*states.cached_state.get::<SurfaceCachedState>().pending()
|
||||
})
|
||||
}
|
||||
fn get_size(&self) -> Option<Vector2<u32>> {
|
||||
|
||||
@@ -107,14 +107,10 @@ impl XdgShellHandler for WaylandState {
|
||||
.wl_surface()
|
||||
.max_size()
|
||||
.map(|s| Vector2::from([s.x as f32, s.y as f32])),
|
||||
logical_rectangle: toplevel
|
||||
.wl_surface()
|
||||
.get_geometry()
|
||||
.map(|r| r.into())
|
||||
.unwrap_or(Geometry {
|
||||
origin: [0; 2].into(),
|
||||
size: initial_size,
|
||||
}),
|
||||
logical_rectangle: toplevel.wl_surface().get_geometry().unwrap_or(Geometry {
|
||||
origin: [0; 2].into(),
|
||||
size: initial_size,
|
||||
}),
|
||||
};
|
||||
toplevel
|
||||
.wl_surface()
|
||||
|
||||
Reference in New Issue
Block a user