diff options
author | Matias Linares <matiaslina@openmailbox.org> | 2016-06-03 16:25:16 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@openmailbox.org> | 2016-06-03 16:25:16 -0300 |
commit | 25034f8d4d70b4048d7540264fc18461982406aa (patch) | |
tree | be189be1386f9e75b964ac7e0914832075cdeb1d /src/dotwm.rs | |
parent | da3fa00ccf4cde76d1d6489c6043d7e56d4f52c5 (diff) | |
download | dotwm-25034f8d4d70b4048d7540264fc18461982406aa.tar.gz |
Add Clippy as dependency.
This brings a lot of clean up on the code.
Diffstat (limited to 'src/dotwm.rs')
-rw-r--r-- | src/dotwm.rs | 9 |
1 files changed, 8 insertions, 1 deletions
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<Desktop>, } -/// 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); |