From d769f11b1b96ab0a9901da1d02e3b59450180774 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 2 Nov 2019 15:13:08 -0400 Subject: fix one more warning --- src/row.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/row.rs') 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, @@ -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(); } } -- cgit v1.2.3-54-g00ecf