From fc6c7a279ea17145476fc1b7af0b22c21b3cd47d Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Sun, 25 Apr 2021 10:46:51 +0200 Subject: [PATCH] ls: clean up imports --- src/uu/ls/src/ls.rs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/uu/ls/src/ls.rs b/src/uu/ls/src/ls.rs index 6abaaa0b9..73f350f45 100644 --- a/src/uu/ls/src/ls.rs +++ b/src/uu/ls/src/ls.rs @@ -22,25 +22,22 @@ use lscolors::LsColors; use number_prefix::NumberPrefix; use once_cell::unsync::OnceCell; use quoting_style::{escape_name, QuotingStyle}; -#[cfg(unix)] -use std::collections::HashMap; -#[cfg(any(unix, target_os = "redox"))] -use std::os::unix::fs::{FileTypeExt, MetadataExt}; #[cfg(windows)] use std::os::windows::fs::MetadataExt; -#[cfg(unix)] -use std::time::Duration; -use std::{cmp::Reverse, process::exit}; use std::{ + cmp::Reverse, fs::{self, DirEntry, FileType, Metadata}, - io::{stdout, BufWriter, Write}, + io::{stdout, BufWriter, Stdout, Write}, path::{Path, PathBuf}, -}; -use std::{ - io::Stdout, + process::exit, time::{SystemTime, UNIX_EPOCH}, }; - +#[cfg(unix)] +use std::{ + collections::HashMap, + os::unix::fs::{FileTypeExt, MetadataExt}, + time::Duration, +}; use term_grid::{Cell, Direction, Filling, Grid, GridOptions}; use time::{strftime, Timespec}; #[cfg(unix)]