fix: clippy
This commit is contained in:
@@ -112,7 +112,9 @@ impl Drawable for Model {
|
||||
.get_or_try_init(|| {
|
||||
self.pending_model_path
|
||||
.get()
|
||||
.and_then(|path| SKModel::from_file(sk, path.as_path(), None).clone())
|
||||
.and_then(|path| SKModel::from_file(sk, path.as_path(), None))
|
||||
.as_ref()
|
||||
.cloned()
|
||||
.map(SendWrapper::new)
|
||||
.ok_or(Error)
|
||||
})
|
||||
|
||||
@@ -177,7 +177,7 @@ impl PanelItem {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn if_mapped(core_surface: &Arc<CoreSurface>, surface_data: &SurfaceData) {
|
||||
pub fn if_mapped(_core_surface: &Arc<CoreSurface>, surface_data: &SurfaceData) {
|
||||
if let Some(panel_node) = surface_data.data_map.get::<Arc<Node>>() {
|
||||
let panel_item = PanelItem::from_node(panel_node);
|
||||
|
||||
@@ -473,7 +473,7 @@ impl PanelItem {
|
||||
surfaces
|
||||
.iter()
|
||||
.find(|surf| surf.wl_surface().clone() == core_surface.wl_surface())
|
||||
.map(|surf| surf.clone())
|
||||
.cloned()
|
||||
});
|
||||
|
||||
if let Some(toplevel_surface) = toplevel_surface {
|
||||
|
||||
@@ -31,7 +31,7 @@ use std::sync::{Arc, Weak};
|
||||
pub struct ClientState;
|
||||
impl ClientData for ClientState {
|
||||
fn initialized(&self, client_id: ClientId) {
|
||||
println!("Wayland client {:?} connected", client_id.clone());
|
||||
println!("Wayland client {:?} connected", client_id);
|
||||
}
|
||||
|
||||
fn disconnected(&self, client_id: ClientId, reason: DisconnectReason) {
|
||||
|
||||
@@ -45,13 +45,13 @@ impl XdgShellHandler for WaylandState {
|
||||
if let Some(panel_node) = data.data_map.get::<Arc<Node>>() {
|
||||
if let Some(core_surface) = data.data_map.get::<Arc<CoreSurface>>() {
|
||||
let panel_item = PanelItem::from_node(panel_node);
|
||||
if core_surface
|
||||
let has_data = core_surface
|
||||
.with_data(|data| {
|
||||
data.size.x = size.w as u32;
|
||||
data.size.y = size.h as u32;
|
||||
})
|
||||
.is_some()
|
||||
{
|
||||
.is_some();
|
||||
if has_data {
|
||||
panel_item.resize();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user