From 470e1819153da90885e9cd94ba0177aa2ccfac9b Mon Sep 17 00:00:00 2001 From: brian cully Date: Mon, 29 Dec 2025 10:32:50 -0500 Subject: create lines from point refs --- src/line.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/line.rs') diff --git a/src/line.rs b/src/line.rs index 07a1f03..17191ce 100644 --- a/src/line.rs +++ b/src/line.rs @@ -1,12 +1,12 @@ use crate::point::Point; -pub struct Line { - p1: Point, - p2: Point, +pub struct Line<'a> { + p1: &'a Point, + p2: &'a Point, } -impl Line { - pub fn new(p1: Point, p2: Point) -> Self { +impl<'a> Line<'a> { + pub fn new(p1: &'a Point, p2: &'a Point) -> Self { Self { p1, p2 } } -- cgit v1.3