summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2020-07-06 12:57:47 +0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2020-07-06 12:57:47 +0800
commite867e58ebd2febc66342f0337f08b75574b24e02 (patch)
tree4278455424ecfacdba40fd91ab83f9e5a5a18e36 /src
parent86f16c3042d9f8ba400512c8f2916c3a40e2d1f8 (diff)
termcolor spends 1200 lines on handlings buffers, and it's not liking plain io::Write
Which means it doesn't like what's currently there. So let's go back to what can actually work: colored.
Diffstat (limited to 'src')
-rw-r--r--src/aggregate.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/aggregate.rs b/src/aggregate.rs
index 57103ac..a216089 100644
--- a/src/aggregate.rs
+++ b/src/aggregate.rs
@@ -1,9 +1,9 @@
use crate::{crossdev, InodeFilter, WalkOptions, WalkResult};
use anyhow::Result;
-use colored::Colorize;
use filesize::PathExt;
use std::borrow::Cow;
use std::{fmt, io, path::Path};
+use termcolor;
use termion::color;
/// Aggregate the given `paths` and write information about them to `out` in a human-readable format.
@@ -130,12 +130,7 @@ fn write_path<C: fmt::Display>(
writeln!(
out,
"{byte_color}{:>byte_column_width$}{byte_color_reset} {path_color}{}{path_color_reset}{}",
- options
- .byte_format
- .display(num_bytes)
- .to_string()
- .as_str()
- .green(), // needed for formatting to work (unless we implement it ourselves)
+ options.byte_format.display(num_bytes),
path.as_ref().display(),
if num_errors == 0 {
Cow::Borrowed("")