From 44c3736625a1ac0e35bf80c6f8b61a44f7bd6c3a Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 25 Sep 2024 19:43:09 +0200 Subject: [PATCH] Avoid use of redundant constructor --- .../fj-core/src/algorithms/intersect/line_segment.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/fj-core/src/algorithms/intersect/line_segment.rs b/crates/fj-core/src/algorithms/intersect/line_segment.rs index 968ee982f..6fa7ccba3 100644 --- a/crates/fj-core/src/algorithms/intersect/line_segment.rs +++ b/crates/fj-core/src/algorithms/intersect/line_segment.rs @@ -82,7 +82,7 @@ mod tests { assert_eq!( LineSegmentIntersection::compute( &line, - &LineSegment::from_points([[1., -1.], [1., 1.]]), + &LineSegment::from([[1., -1.], [1., 1.]]), ), Some(LineSegmentIntersection::Point { point_on_line: Point::from([Scalar::ONE]) @@ -98,7 +98,7 @@ mod tests { assert_eq!( LineSegmentIntersection::compute( &line, - &LineSegment::from_points([[1., 0.], [2., 0.]]), + &LineSegment::from([[1., 0.], [2., 0.]]), ), Some(LineSegmentIntersection::Coincident { points_on_line: [Point::from([1.]), Point::from([2.])], @@ -114,7 +114,7 @@ mod tests { assert_eq!( LineSegmentIntersection::compute( &line, - &LineSegment::from_points([[1., 1.], [1., 2.]]), + &LineSegment::from([[1., 1.], [1., 2.]]), ), None, ); @@ -128,7 +128,7 @@ mod tests { assert_eq!( LineSegmentIntersection::compute( &line, - &LineSegment::from_points([[1., -2.], [1., -1.]]), + &LineSegment::from([[1., -2.], [1., -1.]]), ), None, ); @@ -142,7 +142,7 @@ mod tests { assert_eq!( LineSegmentIntersection::compute( &line, - &LineSegment::from_points([[-1., 1.], [1., 1.]]), + &LineSegment::from([[-1., 1.], [1., 1.]]), ), None, );