summaryrefslogtreecommitdiff
path: root/src/socket/mod.rs
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2016-06-03 16:25:16 -0300
committerMatias Linares <matiaslina@openmailbox.org>2016-06-03 16:25:16 -0300
commit25034f8d4d70b4048d7540264fc18461982406aa (patch)
treebe189be1386f9e75b964ac7e0914832075cdeb1d /src/socket/mod.rs
parentda3fa00ccf4cde76d1d6489c6043d7e56d4f52c5 (diff)
downloaddotwm-25034f8d4d70b4048d7540264fc18461982406aa.tar.gz
Add Clippy as dependency.
This brings a lot of clean up on the code.
Diffstat (limited to 'src/socket/mod.rs')
-rw-r--r--src/socket/mod.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/socket/mod.rs b/src/socket/mod.rs
index 66dae16..c29db2b 100644
--- a/src/socket/mod.rs
+++ b/src/socket/mod.rs
@@ -25,14 +25,11 @@ pub struct ParsedCmd<'a> {
impl<'a> ParsedCmd<'a> {
pub fn handle(self, wm: &mut DotWM, bindings: &mut BindingHash) {
- match self.f {
- FnType::Bind => {
- let modifier: u32 = self.modifiers.iter()
- .fold(0, |acc, x| acc | x );
- add_binding(wm, bindings,
- self.key, modifier, self.func, &self.args);
- },
- _ => (),
+ if self.f == FnType::Bind {
+ let modifier: u32 = self.modifiers.iter()
+ .fold(0, |acc, x| acc | x );
+ add_binding(wm, bindings,
+ self.key, modifier, self.func, &self.args);
}
}
}