Skip to content

Commit

Permalink
Refactor to simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Sep 8, 2023
1 parent 8978c5a commit b7d7fc3
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions crates/fj-core/src/algorithms/approx/curve/approx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,10 @@ impl CurveApprox {
}
}

match existing_segment {
Some(segment) => segment,
None => {
self.segments.push(new_segment.clone());
new_segment
}
}
existing_segment.unwrap_or_else(|| {
self.segments.push(new_segment.clone());
new_segment
})
}
}

Expand Down

0 comments on commit b7d7fc3

Please sign in to comment.