diff options
Diffstat (limited to 'src/socket/parser.rs')
-rw-r--r-- | src/socket/parser.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<u32, &'static str> { fn modifiers<'a>(s: &'a str) -> Result<Vec<u32>, &'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<ParsedCmd<'a>, &'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<ParsedCmd<'a>, &'static str> { Err("missing arguments") } }, - &"exec" => { + "exec" => { Ok(ParsedCmd { f: FnType::Exec, modifiers: vec![], |