chore: clippy fixes

This commit is contained in:
Hojjat 2026-09-04 07:46:03 -06:00 • committed by Victoria Brekenfeld
parent 057e7b72cc
commit 0f56d214b9
7 changed files with 66 additions and 72 deletions

View file

@ -1724,12 +1724,12 @@ impl PointerTarget<State> for CosmicStack {
state.common.config.cosmic_conf.edge_snap_threshold,
false,
);
if let Some((grab, focus)) = res {
if let GrabType::Pointer = grab.grab_type() {
seat.get_pointer()
.unwrap()
.set_grab(state, grab, serial, focus);
}
if let Some((grab, focus)) = res
&& let GrabType::Pointer = grab.grab_type()
{
seat.get_pointer()
.unwrap()
.set_grab(state, grab, serial, focus);
}
});
}
@ -1785,12 +1785,12 @@ impl PointerTarget<State> for CosmicStack {
&state.common.event_loop_handle,
false,
);
if let Some((grab, focus)) = res {
if let GrabType::Pointer = grab.grab_type() {
seat.get_pointer()
.unwrap()
.set_grab(state, grab, serial, focus);
}
if let Some((grab, focus)) = res
&& let GrabType::Pointer = grab.grab_type()
{
seat.get_pointer()
.unwrap()
.set_grab(state, grab, serial, focus);
}
});
}
@ -1999,13 +1999,13 @@ impl TabletToolTarget<State> for CosmicStack {
state.common.config.cosmic_conf.edge_snap_threshold,
false,
);
if let Some((grab, focus)) = res {
if let GrabType::TabletTool = grab.grab_type() {
seat.tablet_seat()
.get_tool(grab.tool().unwrap())
.unwrap()
.set_grab(state, grab, InputTime::now(), serial, focus);
}
if let Some((grab, focus)) = res
&& let GrabType::TabletTool = grab.grab_type()
{
seat.tablet_seat()
.get_tool(grab.tool().unwrap())
.unwrap()
.set_grab(state, grab, InputTime::now(), serial, focus);
}
});
}

View file

@ -1112,12 +1112,12 @@ impl PointerTarget<State> for CosmicWindow {
false,
);
if let Some((grab, focus)) = res {
if let GrabType::Pointer = grab.grab_type() {
seat.get_pointer()
.unwrap()
.set_grab(state, grab, serial, focus)
}
if let Some((grab, focus)) = res
&& let GrabType::Pointer = grab.grab_type()
{
seat.get_pointer()
.unwrap()
.set_grab(state, grab, serial, focus)
}
});
}
@ -1315,13 +1315,13 @@ impl TabletToolTarget<State> for CosmicWindow {
false,
);
if let Some((grab, focus)) = res {
if let GrabType::TabletTool = grab.grab_type() {
seat.tablet_seat()
.get_tool(grab.tool().unwrap())
.unwrap()
.set_grab(state, grab, InputTime::now(), serial, focus)
}
if let Some((grab, focus)) = res
&& let GrabType::TabletTool = grab.grab_type()
{
seat.tablet_seat()
.get_tool(grab.tool().unwrap())
.unwrap()
.set_grab(state, grab, InputTime::now(), serial, focus)
}
});
}