refactor: Compatibility with Rust 1.20
for_each was stabilised in 1.21, but is not yet available in all distributions.
This commit is contained in:
parent
d742c6526b
commit
2c71e092f6
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue