From 15722e3ace69dcf92f206e74918dacf65df939a3 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Mon, 27 Jan 2020 23:01:55 -0600 Subject: [PATCH] refactor/polish ~ fix `cargo clippy` complaints (unused imports) --- src/ls/ls.rs | 7 +++++-- tests/test_who.rs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ls/ls.rs b/src/ls/ls.rs index 5b8d21678..56acc97dc 100644 --- a/src/ls/ls.rs +++ b/src/ls/ls.rs @@ -14,12 +14,15 @@ extern crate termsize; extern crate time; extern crate unicode_width; extern crate number_prefix; -extern crate isatty; -use isatty::stdout_isatty; use number_prefix::{Standalone, Prefixed, decimal_prefix}; 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)] #[macro_use] extern crate lazy_static; diff --git a/tests/test_who.rs b/tests/test_who.rs index 039f2e86c..539b3fe9c 100644 --- a/tests/test_who.rs +++ b/tests/test_who.rs @@ -1,7 +1,7 @@ +#[cfg(target_os = "linux")] use common::util::*; - #[cfg(target_os = "linux")] #[test] fn test_count() {