aboutsummaryrefslogtreecommitdiffstats
path: root/src/line.rs
diff options
context:
space:
mode:
authorbrian cully <bjc@spork.org>2025-12-29 10:32:50 -0500
committerbrian cully <bjc@spork.org>2025-12-29 10:32:50 -0500
commit470e1819153da90885e9cd94ba0177aa2ccfac9b (patch)
treea23b090eb9cc033ab6c62ad7ea29c48aedeac144 /src/line.rs
parent03d727eea91ba000b0aace7f15069ec542059eff (diff)
downloadpolyring-470e1819153da90885e9cd94ba0177aa2ccfac9b.tar.gz
polyring-470e1819153da90885e9cd94ba0177aa2ccfac9b.zip
create lines from point refs
Diffstat (limited to 'src/line.rs')
-rw-r--r--src/line.rs10
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 }
}