summaryrefslogtreecommitdiffstats
path: root/src/column.rs
diff options
context:
space:
mode:
authorBen S <ogham@bsago.me>2015-04-23 13:46:37 +0100
committerBen S <ogham@bsago.me>2015-04-23 13:46:37 +0100
commitd7d11f77f3a6cbc71e013a3c57eb78d5352b2a5e (patch)
tree1d6c5f14daf813ba8be96730ac78deec8bbabc87 /src/column.rs
parentadbaa51cb9421df43625b96ea3ea39b455fd5ee4 (diff)
Use unicode_width crate
Diffstat (limited to 'src/column.rs')
-rw-r--r--src/column.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/column.rs b/src/column.rs
index 181605a..73692e3 100644
--- a/src/column.rs
+++ b/src/column.rs
@@ -1,8 +1,11 @@
use std::iter::repeat;
+use options::{SizeFormat, TimeType};
+
use ansi_term::Style;
+use unicode_width::UnicodeWidthStr;
+
-use options::{SizeFormat, TimeType};
#[derive(PartialEq, Debug, Copy, Clone)]
pub enum Column {
@@ -86,7 +89,7 @@ impl Cell {
pub fn paint(style: Style, string: &str) -> Cell {
Cell {
text: style.paint(string).to_string(),
- length: string.width(false),
+ length: UnicodeWidthStr::width(string),
}
}
}