Remove manual Hash impl

Added support for this to wayland-rs.
This commit is contained in:
Ian Douglas Scott 2023-11-16 13:38:37 -08:00
parent 7f1f46c9c7
commit 96389fa999

View file

@ -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<H>(&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