summaryrefslogtreecommitdiffstats
path: root/src/cell.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cell.rs')
-rw-r--r--src/cell.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cell.rs b/src/cell.rs
index 255c3fd..cca22d4 100644
--- a/src/cell.rs
+++ b/src/cell.rs
@@ -2,9 +2,9 @@
use std::io::{Write, Error};
use std::string::ToString;
-use unicode_width::UnicodeWidthStr;
use super::{Attr, Terminal, color};
use super::format::Alignment;
+use super::utils::display_width;
use super::utils::print_align;
/// Represent a table cell containing a string.
@@ -26,7 +26,7 @@ impl Cell {
let content: Vec<String> = string.lines().map(|x| x.to_string()).collect();
let mut width = 0;
for cont in &content {
- let l = UnicodeWidthStr::width(&cont[..]);
+ let l = display_width(&cont[..]);
if l > width {
width = l;
}