diff options
author | Vincent Ambo <tazjin@gmail.com> | 2017-10-20T19·40+0200 |
---|---|---|
committer | Vincent Ambo <tazjin@gmail.com> | 2017-10-20T19·40+0200 |
commit | 2c71e092f69f5cd3c31ad8a84aa4168118579898 (patch) | |
tree | 23362dfc633355b285bd6276a210e710ae0ba7ab | |
parent | d742c6526b72d34dc6a540f8e0d1b5c91171ae2a (diff) |
refactor: Compatibility with Rust 1.20
for_each was stabilised in 1.21, but is not yet available in all distributions.
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 634d98f900ad..7a80b9708839 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ fn run_ls() { let mqueues = read_dir("/dev/mqueue") .expect("Could not read message queues"); - mqueues.for_each(|queue| { + for queue in mqueues { let path = queue.unwrap().path(); let status = { let mut file = File::open(&path) @@ -25,7 +25,7 @@ fn run_ls() { let queue_name = path.components().last().unwrap().as_os_str(); println!("{:?}: {}", queue_name, status) - }); + }; } fn run_inspect(queue_name: &str) { |