aboutsummaryrefslogtreecommitdiffstats
path: root/src/row.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-02 15:13:08 -0400
committerJesse Luehrs <doy@tozt.net>2019-11-02 15:13:08 -0400
commitd769f11b1b96ab0a9901da1d02e3b59450180774 (patch)
tree8239edba34a4976682f583c1aabc878d3947c6c2 /src/row.rs
parent3a10a9f20c2e8a28fdec5d1306f697aa655355b2 (diff)
downloadvt100-rust-d769f11b1b96ab0a9901da1d02e3b59450180774.tar.gz
vt100-rust-d769f11b1b96ab0a9901da1d02e3b59450180774.zip
fix one more warning
Diffstat (limited to 'src/row.rs')
-rw-r--r--src/row.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/row.rs b/src/row.rs
index e87bc04..3ac8881 100644
--- a/src/row.rs
+++ b/src/row.rs
@@ -1,3 +1,5 @@
+use std::convert::TryInto as _;
+
#[derive(Clone)]
pub struct Row {
cells: Vec<crate::cell::Cell>,
@@ -118,7 +120,7 @@ impl Row {
let mut max_col = None;
for (col, cell) in self.cells.iter().enumerate() {
if cell.has_contents() || prev_was_wide {
- max_col = Some(col as u16);
+ max_col = Some(col.try_into().unwrap());
prev_was_wide = cell.is_wide();
}
}