Fix 1.68 clippy warnings

This commit is contained in:
Emil Ernerfeldt authored and GitHub committed 2023-03-12 20:02:49 +03:00
1 parent b18295a1ce
commit 3217eaa416
5 files changed
+21 -50

No files matched your search

+2 -7
View File
@@ -23,7 +23,7 @@ impl From<bool> for StateOperation {
/// X window type. Maps directly to
/// [`_NET_WM_WINDOW_TYPE`](https://specifications.freedesktop.org/wm-spec/wm-spec-1.5.html).
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub enum WindowType {
/// A desktop feature. This can include a single window containing desktop icons with the same dimensions as the
@@ -61,15 +61,10 @@ pub enum WindowType {
/// This property is typically used on override-redirect windows.
Dnd,
/// This is a normal, top-level window.
#[default]
Normal,
}
impl Default for WindowType {
fn default() -> Self {
WindowType::Normal
}
}
impl WindowType {
pub(crate) fn as_atom(&self, xconn: &Arc<XConnection>) -> ffi::Atom {
use self::WindowType::*;