Skip to content

Commit

Permalink
Remove redundant field from Face
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Nov 2, 2022
1 parent e86b115 commit df03f2c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/fj-kernel/src/objects/face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ use super::{Cycle, Objects, Surface};
/// [`Shell`]: super::Shell
#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct Face {
surface: Handle<Surface>,
exterior: Handle<Cycle>,
interiors: Vec<Handle<Cycle>>,
color: Color,
Expand Down Expand Up @@ -64,7 +63,7 @@ impl Face {
the_interiors: impl IntoIterator<Item = Handle<Cycle>>,
color: Color,
) -> Self {
let surface = exterior.surface().clone();
let surface = exterior.surface();
let mut interiors = Vec::new();

for interior in the_interiors.into_iter() {
Expand All @@ -83,7 +82,6 @@ impl Face {
}

Self {
surface,
exterior,
interiors,
color,
Expand All @@ -92,7 +90,7 @@ impl Face {

/// Access this face's surface
pub fn surface(&self) -> &Handle<Surface> {
&self.surface
self.exterior().surface()
}

/// Access the cycle that bounds the face on the outside
Expand Down

0 comments on commit df03f2c

Please sign in to comment.