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/socket/parser.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/socket/parser.rs') diff --git a/src/socket/parser.rs b/src/socket/parser.rs index 30487d8..e475962 100644 --- a/src/socket/parser.rs +++ b/src/socket/parser.rs @@ -36,7 +36,7 @@ fn modifier_from<'a>(s: &'a str) -> Result { fn modifiers<'a>(s: &'a str) -> Result, &'static str> { let mut result = vec![]; - for smod in s.split("-") { + for smod in s.split('-') { let modifier = simple_try!(modifier_from(smod)); result.push(modifier); } @@ -128,8 +128,8 @@ pub fn parse<'a>(input: &'a str) -> Result, &'static str> { match args.first() { Some(cmd) => { - match cmd { - &"bind" => { + match *cmd { + "bind" => { if args.len() > 2 { let modifiers = simple_try!(modifiers(args[1])); let key = simple_try!(key(args[2])); @@ -147,7 +147,7 @@ pub fn parse<'a>(input: &'a str) -> Result, &'static str> { Err("missing arguments") } }, - &"exec" => { + "exec" => { Ok(ParsedCmd { f: FnType::Exec, modifiers: vec![], -- cgit v1.2.3-70-g09d2