diff options
Diffstat (limited to 'src/index.rs')
-rw-r--r-- | src/index.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/index.rs b/src/index.rs index 0351c0ee..f6ea4ad3 100644 --- a/src/index.rs +++ b/src/index.rs @@ -19,6 +19,8 @@ use std::cmp::{Ord, Ordering}; use std::fmt; use std::ops::{self, Add, AddAssign, Deref, Range, RangeInclusive, Sub, SubAssign}; +use crate::term::RenderableCell; + /// The side of a cell #[derive(Debug, Copy, Clone, Eq, PartialEq)] pub enum Side { @@ -69,6 +71,12 @@ impl From<Point> for Point<usize> { } } +impl From<&RenderableCell> for Point<Line> { + fn from(cell: &RenderableCell) -> Self { + Point::new(cell.line, cell.column) + } +} + /// A line /// /// Newtype to avoid passing values incorrectly |