fix: clippy lints

This commit is contained in:
Ryan Brue 2024-04-03 07:24:30 -05:00 committed by Ashley Wulber
parent 7aead1ce47
commit 1e5af14bc4
3 changed files with 9 additions and 21 deletions

View file

@ -8,13 +8,11 @@ use crate::wayland_subscription::ToplevelUpdate;
use crate::wayland_subscription::WaylandImage;
use crate::wayland_subscription::WaylandRequest;
use crate::wayland_subscription::WaylandUpdate;
use crate::wayland_subscription::WorkspaceUpdate;
use cctk::sctk::reexports::calloop::channel::Sender;
use cctk::toplevel_info::ToplevelInfo;
use cctk::wayland_client::protocol::wl_data_device_manager::DndAction;
use cctk::wayland_client::protocol::wl_seat::WlSeat;
use cosmic::cosmic_config::{Config, CosmicConfigEntry};
use cosmic::desktop::IconSource;
use cosmic::desktop::{
app_id_or_fallback_matches, load_applications_for_app_ids, DesktopEntryData,
};
@ -1064,12 +1062,9 @@ impl cosmic::Application for CosmicAppList {
}
}
},
WaylandUpdate::Workspace(event) => match event {
WorkspaceUpdate::Enter(handle) => {
self.active_workspace = Some(handle);
}
_ => {}
},
WaylandUpdate::Workspace(handle) => {
self.active_workspace = Some(handle);
}
WaylandUpdate::ActivationToken {
token,
exec,
@ -1370,7 +1365,7 @@ impl cosmic::Application for CosmicAppList {
.config
.favorites
.iter()
.any(|x| app_id_or_fallback_matches(&x, desktop_info));
.any(|x| app_id_or_fallback_matches(x, desktop_info));
let mut content = column![container(
iced::widget::text(&desktop_info.name)

View file

@ -1,5 +1,5 @@
use crate::wayland_subscription::{
ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate, WorkspaceUpdate,
ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate,
};
use std::{
os::{
@ -114,11 +114,9 @@ impl WorkspaceHandler for AppData {
.state
.contains(&WEnum::Value(WorkspaceUpdateState::Active))
{
let _ =
self.tx
.unbounded_send(WaylandUpdate::Workspace(WorkspaceUpdate::Enter(
workspace.handle.clone(),
)));
let _ = self
.tx
.unbounded_send(WaylandUpdate::Workspace(workspace.handle.clone()));
break 'workspaces_loop;
}
}

View file

@ -99,7 +99,7 @@ pub enum WaylandUpdate {
Init(calloop::channel::Sender<WaylandRequest>),
Finished,
Toplevel(ToplevelUpdate),
Workspace(WorkspaceUpdate),
Workspace(ZcosmicWorkspaceHandleV1),
ActivationToken {
token: Option<String>,
exec: String,
@ -115,11 +115,6 @@ pub enum ToplevelUpdate {
Remove(ZcosmicToplevelHandleV1),
}
#[derive(Clone, Debug)]
pub enum WorkspaceUpdate {
Enter(ZcosmicWorkspaceHandleV1),
}
#[derive(Clone, Debug)]
pub enum WaylandRequest {
Toplevel(ToplevelRequest),