diff options
author | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
commit | a990de90fe41456a23e58bd087d2f107d321f3a1 (patch) | |
tree | 15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/anstyle-wincon/src/ansi.rs | |
parent | 3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff) | |
download | fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip |
Deleted vendor folder
Diffstat (limited to 'vendor/anstyle-wincon/src/ansi.rs')
-rw-r--r-- | vendor/anstyle-wincon/src/ansi.rs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/vendor/anstyle-wincon/src/ansi.rs b/vendor/anstyle-wincon/src/ansi.rs deleted file mode 100644 index 6ac7193..0000000 --- a/vendor/anstyle-wincon/src/ansi.rs +++ /dev/null @@ -1,25 +0,0 @@ -//! Low-level ANSI-styling - -/// Write ANSI colored text to the stream -pub fn write_colored<S: std::io::Write>( - stream: &mut S, - fg: Option<anstyle::AnsiColor>, - bg: Option<anstyle::AnsiColor>, - data: &[u8], -) -> std::io::Result<usize> { - let non_default = fg.is_some() || bg.is_some(); - - if non_default { - if let Some(fg) = fg { - write!(stream, "{}", fg.render_fg())?; - } - if let Some(bg) = bg { - write!(stream, "{}", bg.render_bg())?; - } - } - let written = stream.write(data)?; - if non_default { - write!(stream, "{}", anstyle::Reset.render())?; - } - Ok(written) -} |