diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-02 15:13:08 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-11-02 15:13:08 -0400 |
commit | d769f11b1b96ab0a9901da1d02e3b59450180774 (patch) | |
tree | 8239edba34a4976682f583c1aabc878d3947c6c2 /src/row.rs | |
parent | 3a10a9f20c2e8a28fdec5d1306f697aa655355b2 (diff) | |
download | vt100-rust-d769f11b1b96ab0a9901da1d02e3b59450180774.tar.gz vt100-rust-d769f11b1b96ab0a9901da1d02e3b59450180774.zip |
fix one more warning
Diffstat (limited to 'src/row.rs')
-rw-r--r-- | src/row.rs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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(); } } |