diff --git a/src/wayland/capture.rs b/src/wayland/capture.rs index 5b02071..5361b3f 100644 --- a/src/wayland/capture.rs +++ b/src/wayland/capture.rs @@ -15,7 +15,7 @@ use std::sync::{ use super::{AppData, Buffer}; -#[derive(Clone, PartialEq, Eq)] +#[derive(Clone, Hash, PartialEq, Eq)] pub enum CaptureSource { Toplevel(zcosmic_toplevel_handle_v1::ZcosmicToplevelHandleV1), Workspace( @@ -24,20 +24,6 @@ pub enum CaptureSource { ), } -#[allow(clippy::derive_hash_xor_eq)] -impl std::hash::Hash for CaptureSource { - fn hash(&self, state: &mut H) - where - H: std::hash::Hasher, - { - match self { - Self::Toplevel(handle) => handle.id(), - Self::Workspace(handle, _output) => handle.id(), - } - .hash(state) - } -} - #[derive(Clone, Debug, Default)] pub struct CaptureFilter { // TODO: Use `WlOutput` when one Wayland connection is used