Skip to content

Commit 4cb57fb

Browse files
committed
ls: cleanup imports
They were a bit jumbled with no particular logic, at least that I could see.
1 parent 4ba8d3e commit 4cb57fb

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

src/uu/ls/src/ls.rs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,24 @@
77

88
#[cfg(unix)]
99
use std::collections::HashMap;
10-
use std::iter;
11-
use std::ops::RangeInclusive;
1210
#[cfg(unix)]
1311
use std::os::unix::fs::{FileTypeExt, MetadataExt};
1412
#[cfg(windows)]
1513
use std::os::windows::fs::MetadataExt;
16-
use std::{cell::LazyCell, cell::OnceCell, num::IntErrorKind};
1714
use std::{
15+
cell::{LazyCell, OnceCell},
1816
cmp::Reverse,
17+
collections::HashSet,
1918
ffi::{OsStr, OsString},
2019
fmt::Write as FmtWrite,
2120
fs::{self, DirEntry, FileType, Metadata, ReadDir},
22-
io::{BufWriter, ErrorKind, Stdout, Write, stdout},
21+
io::{BufWriter, ErrorKind, IsTerminal, Stdout, Write, stdout},
22+
iter,
23+
num::IntErrorKind,
24+
ops::RangeInclusive,
2325
path::{Path, PathBuf},
2426
time::{Duration, SystemTime, UNIX_EPOCH},
2527
};
26-
use std::{collections::HashSet, io::IsTerminal};
2728

2829
use ansi_width::ansi_width;
2930
use clap::{
@@ -34,12 +35,9 @@ use glob::{MatchOptions, Pattern};
3435
use lscolors::LsColors;
3536
use term_grid::{DEFAULT_SEPARATOR_SIZE, Direction, Filling, Grid, GridOptions, SPACES_IN_TAB};
3637
use thiserror::Error;
38+
3739
#[cfg(unix)]
3840
use uucore::entries;
39-
use uucore::error::USimpleError;
40-
use uucore::format::human::{SizeFormat, human_readable};
41-
use uucore::fs::FileInformation;
42-
use uucore::fsext::{MetadataTimeField, metadata_get_time};
4341
#[cfg(all(unix, not(any(target_os = "android", target_os = "macos"))))]
4442
use uucore::fsxattr::has_acl;
4543
#[cfg(unix)]
@@ -57,22 +55,25 @@ use uucore::libc::{S_IXGRP, S_IXOTH, S_IXUSR};
5755
target_os = "solaris"
5856
))]
5957
use uucore::libc::{dev_t, major, minor};
60-
use uucore::line_ending::LineEnding;
61-
use uucore::translate;
62-
63-
use uucore::quoting_style::{QuotingStyle, locale_aware_escape_dir_name, locale_aware_escape_name};
64-
use uucore::time::{FormatSystemTimeFallback, format, format_system_time};
6558
use uucore::{
6659
display::Quotable,
67-
error::{UError, UResult, set_exit_code},
60+
error::{UError, UResult, USimpleError, set_exit_code},
61+
format::human::{SizeFormat, human_readable},
6862
format_usage,
63+
fs::FileInformation,
6964
fs::display_permissions,
65+
fsext::{MetadataTimeField, metadata_get_time},
66+
line_ending::LineEnding,
7067
os_str_as_bytes_lossy,
68+
parser::parse_glob,
7169
parser::parse_size::parse_size_u64,
7270
parser::shortcut_value_parser::ShortcutValueParser,
71+
quoting_style::{QuotingStyle, locale_aware_escape_dir_name, locale_aware_escape_name},
72+
show, show_error, show_warning,
73+
time::{FormatSystemTimeFallback, format, format_system_time},
74+
translate,
7375
version_cmp::version_cmp,
7476
};
75-
use uucore::{parser::parse_glob, show, show_error, show_warning};
7677

7778
mod dired;
7879
use dired::{DiredOutput, is_dired_arg_present};

0 commit comments

Comments
 (0)