From 25034f8d4d70b4048d7540264fc18461982406aa Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Fri, 3 Jun 2016 16:25:16 -0300 Subject: Add Clippy as dependency. This brings a lot of clean up on the code. --- src/dotwm.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/dotwm.rs') diff --git a/src/dotwm.rs b/src/dotwm.rs index 666deff..fd28765 100644 --- a/src/dotwm.rs +++ b/src/dotwm.rs @@ -51,6 +51,7 @@ pub enum WmAtom { } #[derive(Hash,Eq,PartialEq)] +#[allow(enum_variant_names)] pub enum NetAtom { NetSupported, NetFullscreen, @@ -74,7 +75,7 @@ pub struct DotWM { pub desktops: Vec, } -/// DotWM state. +/// `DotWM` state. impl DotWM { /// Create a state of the Dot Window Manager pub fn new() -> DotWM { @@ -218,6 +219,12 @@ impl DotWM { } } +impl Default for DotWM { + fn default() -> Self { + DotWM::new() + } +} + impl Drop for DotWM { fn drop(&mut self) { close_display(self.display); -- cgit v1.2.3-54-g00ecf