chore: manual clippy
This commit is contained in:
parent
0847247c33
commit
5e9ea93819
20 changed files with 253 additions and 291 deletions
|
|
@ -46,10 +46,7 @@ impl WorkspaceHandler for State {
|
|||
if let Some(workspace) = shell.workspaces.space_for_handle_mut(&workspace) {
|
||||
let mut guard = self.common.workspace_state.update();
|
||||
workspace.set_tiling(
|
||||
match state.into_result() {
|
||||
Ok(TilingState::FloatingOnly) => false,
|
||||
_ => true,
|
||||
},
|
||||
!matches!(state.into_result(), Ok(TilingState::FloatingOnly)),
|
||||
&seat,
|
||||
&mut guard,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -288,9 +288,10 @@ where
|
|||
data_init: &mut DataInit<'_, D>,
|
||||
) {
|
||||
if let ToplevelSourceRequest::CreateSource {
|
||||
source,
|
||||
toplevel_handle,
|
||||
} = request {
|
||||
source,
|
||||
toplevel_handle,
|
||||
} = request
|
||||
{
|
||||
let data = match window_from_ext_handle(state, &toplevel_handle) {
|
||||
Some(toplevel) => ImageCaptureSourceData::Toplevel(toplevel.clone()),
|
||||
None => ImageCaptureSourceData::Destroyed,
|
||||
|
|
@ -316,7 +317,7 @@ where
|
|||
_state: &mut D,
|
||||
_client: &Client,
|
||||
_resource: &ExtImageCaptureSourceV1,
|
||||
request: <ExtImageCaptureSourceV1 as Resource>::Request,
|
||||
_request: <ExtImageCaptureSourceV1 as Resource>::Request,
|
||||
_data: &ImageCaptureSourceData,
|
||||
_dhandle: &DisplayHandle,
|
||||
_data_init: &mut DataInit<'_, D>,
|
||||
|
|
|
|||
|
|
@ -276,10 +276,11 @@ where
|
|||
.iter_mut()
|
||||
.map(|(head, conf)| {
|
||||
let output = match inner
|
||||
.instances
|
||||
.iter()
|
||||
.find_map(|instance| instance.heads.iter().find(|h| h.obj == *head))
|
||||
.map(|i| i.output.clone()) {
|
||||
.instances
|
||||
.iter()
|
||||
.find_map(|instance| instance.heads.iter().find(|h| h.obj == *head))
|
||||
.map(|i| i.output.clone())
|
||||
{
|
||||
Some(o) => o,
|
||||
None => {
|
||||
return Err(zwlr_output_configuration_head_v1::Error::InvalidMode);
|
||||
|
|
@ -323,10 +324,10 @@ where
|
|||
.iter()
|
||||
.any(|o| !inner.outputs.contains(o))
|
||||
|| final_conf.iter().any(|(o, c)| match c {
|
||||
OutputConfiguration::Enabled { mode, .. } => match mode {
|
||||
Some(ModeConfiguration::Mode(m)) => !o.modes().contains(m),
|
||||
_ => false,
|
||||
},
|
||||
OutputConfiguration::Enabled {
|
||||
mode: Some(ModeConfiguration::Mode(m)),
|
||||
..
|
||||
} => !o.modes().contains(m),
|
||||
_ => false,
|
||||
})
|
||||
{
|
||||
|
|
|
|||
|
|
@ -415,9 +415,10 @@ where
|
|||
data_init: &mut smithay::reexports::wayland_server::DataInit<'_, D>,
|
||||
) {
|
||||
if let zcosmic_overlap_notify_v1::Request::NotifyOnOverlap {
|
||||
overlap_notification,
|
||||
layer_surface,
|
||||
} = request {
|
||||
overlap_notification,
|
||||
layer_surface,
|
||||
} = request
|
||||
{
|
||||
let notification = data_init.init(overlap_notification, ());
|
||||
if let Some(surface) = state.layer_surface_from_resource(layer_surface) {
|
||||
let mut data = surface
|
||||
|
|
@ -453,7 +454,7 @@ where
|
|||
_state: &mut D,
|
||||
_client: &Client,
|
||||
_resource: &ZcosmicOverlapNotificationV1,
|
||||
request: <ZcosmicOverlapNotificationV1 as Resource>::Request,
|
||||
_request: <ZcosmicOverlapNotificationV1 as Resource>::Request,
|
||||
_data: &(),
|
||||
_dhandle: &DisplayHandle,
|
||||
_data_init: &mut smithay::reexports::wayland_server::DataInit<'_, D>,
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
fn send_toplevel_to_client<D, W: 'static>(
|
||||
fn send_toplevel_to_client<D, W>(
|
||||
dh: &DisplayHandle,
|
||||
workspace_state: &WorkspaceState<D>,
|
||||
info: &ZcosmicToplevelInfoV1,
|
||||
|
|
@ -442,7 +442,7 @@ where
|
|||
+ Dispatch<ZcosmicToplevelHandleV1, ToplevelHandleState<W>>
|
||||
+ ToplevelInfoHandler<Window = W>
|
||||
+ 'static,
|
||||
W: Window,
|
||||
W: Window + 'static,
|
||||
{
|
||||
let mut state = window
|
||||
.user_data()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue