diff options
| author | brian cully <bjc@spork.org> | 2025-12-29 10:32:50 -0500 |
|---|---|---|
| committer | brian cully <bjc@spork.org> | 2025-12-29 10:32:50 -0500 |
| commit | 470e1819153da90885e9cd94ba0177aa2ccfac9b (patch) | |
| tree | a23b090eb9cc033ab6c62ad7ea29c48aedeac144 /src/line.rs | |
| parent | 03d727eea91ba000b0aace7f15069ec542059eff (diff) | |
| download | polyring-470e1819153da90885e9cd94ba0177aa2ccfac9b.tar.gz polyring-470e1819153da90885e9cd94ba0177aa2ccfac9b.zip | |
create lines from point refs
Diffstat (limited to 'src/line.rs')
| -rw-r--r-- | src/line.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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 } } |
