Merge pull request #2147 from hannobraun/cleanup

Make some minor clean-ups in `fj-core`
This commit is contained in:
Hanno Braun 2023-12-21 21:35:13 +01:00 committed by GitHub
commit cf77d924ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
pub mod curve; pub mod curve;
pub mod cycle; pub mod cycle;
pub mod edge;
pub mod face; pub mod face;
pub mod half_edge;
pub mod region; pub mod region;
pub mod shell; pub mod shell;
pub mod sketch; pub mod sketch;

View File

@ -48,8 +48,8 @@ pub use self::{
kinds::{ kinds::{
curve::Curve, curve::Curve,
cycle::Cycle, cycle::Cycle,
edge::HalfEdge,
face::{Face, Handedness}, face::{Face, Handedness},
half_edge::HalfEdge,
region::Region, region::Region,
shell::Shell, shell::Shell,
sketch::Sketch, sketch::Sketch,

View File

@ -9,7 +9,7 @@ pub trait UpdateCycle {
#[must_use] #[must_use]
fn add_half_edges( fn add_half_edges(
&self, &self,
edges: impl IntoIterator<Item = Handle<HalfEdge>>, half_edges: impl IntoIterator<Item = Handle<HalfEdge>>,
) -> Self; ) -> Self;
/// Update an edge of the cycle /// Update an edge of the cycle
@ -47,10 +47,10 @@ pub trait UpdateCycle {
impl UpdateCycle for Cycle { impl UpdateCycle for Cycle {
fn add_half_edges( fn add_half_edges(
&self, &self,
edges: impl IntoIterator<Item = Handle<HalfEdge>>, half_edges: impl IntoIterator<Item = Handle<HalfEdge>>,
) -> Self { ) -> Self {
let edges = self.half_edges().iter().cloned().chain(edges); let half_edges = self.half_edges().iter().cloned().chain(half_edges);
Cycle::new(edges) Cycle::new(half_edges)
} }
fn update_half_edge( fn update_half_edge(