aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-02 15:10:44 -0400
committerJesse Luehrs <doy@tozt.net>2019-11-02 15:10:44 -0400
commit1e5632ef2b5b41f02016aba36f78819a08c1ac49 (patch)
tree999468639d7cd163ab58302ffc2f4f2aade57392
parentbf8b298d125a29321947867a6f60ea133ebe3675 (diff)
downloadvt100-rust-1e5632ef2b5b41f02016aba36f78819a08c1ac49.tar.gz
vt100-rust-1e5632ef2b5b41f02016aba36f78819a08c1ac49.zip
fixup! fix some warnings, and make str_width a bit more efficient
-rw-r--r--src/screen.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/screen.rs b/src/screen.rs
index 20c8de0..f43439e 100644
--- a/src/screen.rs
+++ b/src/screen.rs
@@ -197,7 +197,7 @@ impl State {
let width = crate::unicode::char_width(c);
let attrs = self.attrs;
- self.grid_mut().col_wrap(width as u16);
+ self.grid_mut().col_wrap(width);
let cell = self.current_cell_mut();
if width == 0 {
@@ -228,7 +228,7 @@ impl State {
}
} else {
cell.set(c.to_string(), attrs);
- self.grid_mut().col_inc(width as u16);
+ self.grid_mut().col_inc(width);
}
}