diff --git a/src/builtins/ls.rs b/src/builtins/ls.rs index 6f9e258..09372c2 100644 --- a/src/builtins/ls.rs +++ b/src/builtins/ls.rs @@ -16,12 +16,9 @@ impl Builtin for Ls { //for entry in entries.by_ref().into_iter() {} for entry in entries { - let entry = match entry { - Ok(e) => e, - Err(_) => { - println!("Couldn't get directory entry"); - continue; - } + let Ok(entry) = entry else { + eprintln!("Couldn't get directory entry"); + continue; }; let metadata = match metadata(entry.path()) { Ok(m) => m,