mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
ls: refactor ~ improve line bundling of imports
This commit is contained in:
parent
84f05f209c
commit
3e3dff3a57
1 changed files with 12 additions and 16 deletions
28
src/ls/ls.rs
28
src/ls/ls.rs
|
@ -9,45 +9,41 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
extern crate getopts;
|
extern crate getopts;
|
||||||
|
#[cfg(unix)]
|
||||||
|
extern crate isatty;
|
||||||
extern crate number_prefix;
|
extern crate number_prefix;
|
||||||
extern crate term_grid;
|
extern crate term_grid;
|
||||||
extern crate termsize;
|
extern crate termsize;
|
||||||
extern crate time;
|
extern crate time;
|
||||||
extern crate unicode_width;
|
extern crate unicode_width;
|
||||||
use number_prefix::{decimal_prefix, Prefixed, Standalone};
|
|
||||||
use term_grid::{Cell, Direction, Filling, Grid, GridOptions};
|
|
||||||
use time::{strftime, Timespec};
|
|
||||||
|
|
||||||
#[cfg(unix)]
|
|
||||||
extern crate isatty;
|
|
||||||
#[cfg(unix)]
|
|
||||||
use isatty::stdout_isatty;
|
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate uucore;
|
extern crate uucore;
|
||||||
#[cfg(unix)]
|
|
||||||
use uucore::libc::{mode_t, S_ISGID, S_ISUID, S_ISVTX, S_IWOTH, S_IXGRP, S_IXOTH, S_IXUSR};
|
|
||||||
|
|
||||||
|
#[cfg(unix)]
|
||||||
|
use isatty::stdout_isatty;
|
||||||
|
use number_prefix::{decimal_prefix, Prefixed, Standalone};
|
||||||
use std::cmp::Reverse;
|
use std::cmp::Reverse;
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::fs::{DirEntry, FileType, Metadata};
|
use std::fs::{DirEntry, FileType, Metadata};
|
||||||
use std::path::{Path, PathBuf};
|
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use std::os::unix::fs::FileTypeExt;
|
use std::os::unix::fs::FileTypeExt;
|
||||||
#[cfg(any(unix, target_os = "redox"))]
|
#[cfg(any(unix, target_os = "redox"))]
|
||||||
use std::os::unix::fs::MetadataExt;
|
use std::os::unix::fs::MetadataExt;
|
||||||
#[cfg(unix)]
|
|
||||||
use unicode_width::UnicodeWidthStr;
|
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use std::os::windows::fs::MetadataExt;
|
use std::os::windows::fs::MetadataExt;
|
||||||
|
use std::path::{Path, PathBuf};
|
||||||
|
use term_grid::{Cell, Direction, Filling, Grid, GridOptions};
|
||||||
|
use time::{strftime, Timespec};
|
||||||
|
#[cfg(unix)]
|
||||||
|
use unicode_width::UnicodeWidthStr;
|
||||||
|
#[cfg(unix)]
|
||||||
|
use uucore::libc::{mode_t, S_ISGID, S_ISUID, S_ISVTX, S_IWOTH, S_IXGRP, S_IXOTH, S_IXUSR};
|
||||||
|
|
||||||
static NAME: &str = "ls";
|
static NAME: &str = "ls";
|
||||||
static SUMMARY: &str = "";
|
static SUMMARY: &str = "";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue