summaryrefslogtreecommitdiffstats
path: root/src/draw.rs
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-05-29 18:34:02 -0400
committerDan Davison <dandavison7@gmail.com>2020-05-30 16:55:38 -0400
commitf5e7b066f49f1cbc7bd27e41ee43adae951066ce (patch)
tree71337d81efd3db525f510219ed5068df6cd3da14 /src/draw.rs
parent533c991e451dfd636f6ceb3661df4dfeacaae4f9 (diff)
Make decoration style non-optional
Diffstat (limited to 'src/draw.rs')
-rw-r--r--src/draw.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/draw.rs b/src/draw.rs
index 67a15bb2..0dae0880 100644
--- a/src/draw.rs
+++ b/src/draw.rs
@@ -6,6 +6,17 @@ use box_drawing;
use console::strip_ansi_codes;
use unicode_width::UnicodeWidthStr;
+pub fn write_no_decoration(
+ writer: &mut dyn Write,
+ text: &str,
+ _line_width: usize, // ignored
+ _text_style: ansi_term::Style,
+ _decoration_style: ansi_term::Style,
+) -> std::io::Result<()> {
+ writeln!(writer, "{}", text)?;
+ Ok(())
+}
+
/// Write text to stream, surrounded by a box, leaving the cursor just
/// beyond the bottom right corner.
pub fn write_boxed(