Skip to content

Commit

Permalink
add Default impl
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades authored and hannobraun committed Dec 6, 2022
1 parent 39026ad commit 82854d1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/fj-kernel/src/algorithms/triangulate/polygon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::algorithms::intersect::{
ray_segment::RaySegmentIntersection, HorizontalRayToTheRight, Intersect,
};

#[derive(Default)]
pub struct Polygon {
exterior: PolyChain<2>,
interiors: Vec<PolyChain<2>>,
Expand All @@ -13,10 +14,7 @@ pub struct Polygon {
impl Polygon {
/// Construct an instance of `Polygon`
pub fn new() -> Self {
Self {
exterior: PolyChain::new(),
interiors: Vec::new(),
}
Self::default()
}

pub fn with_exterior(mut self, exterior: impl Into<PolyChain<2>>) -> Self {
Expand Down

0 comments on commit 82854d1

Please sign in to comment.