|
@ -16,12 +16,9 @@ impl Builtin for Ls { |
|
|
//for entry in entries.by_ref().into_iter() {}
|
|
|
//for entry in entries.by_ref().into_iter() {}
|
|
|
|
|
|
|
|
|
for entry in entries {
|
|
|
for entry in entries {
|
|
|
let entry = match entry {
|
|
|
|
|
|
Ok(e) => e,
|
|
|
|
|
|
Err(_) => {
|
|
|
|
|
|
println!("Couldn't get directory entry");
|
|
|
|
|
|
|
|
|
let Ok(entry) = entry else {
|
|
|
|
|
|
eprintln!("Couldn't get directory entry");
|
|
|
continue;
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
};
|
|
|
};
|
|
|
let file_name = entry.file_name().to_string_lossy().to_string();
|
|
|
let file_name = entry.file_name().to_string_lossy().to_string();
|
|
|
let mut file_type = "unknown";
|
|
|
let mut file_type = "unknown";
|
|
|