summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 4f292b6..b1873f3 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,7 @@
// See LICENSE file for copyright and license details.
+#![cfg_attr(feature="clippy", feature(plugin))]
+#![cfg_attr(feature="clippy", plugin(clippy))]
extern crate libc;
extern crate x11;
extern crate unix_socket;
@@ -32,9 +34,8 @@ const SOCKET_PATH: &'static str = "./dotwm.sock";
fn run_autostart() {
let paths = &["./autostart", "/home/matias/.config/dotwm/autostart"];
for path in paths {
- match exec_cmd(path, &[]) {
- Ok(_) => break,
- Err(_) => (),
+ if exec_cmd(path, &[]).is_ok() {
+ break;
}
}
}
@@ -86,7 +87,7 @@ fn main() {
s.read_to_string(&mut buf).unwrap();
for line in buf.lines() {
- let res = parser::parse(&line);
+ let res = parser::parse(line);
match res {
Ok(pcmd) => {
pcmd.handle(&mut dotwm, &mut bindings);