Skip to content

Commit

Permalink
cleanup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-folsom committed Jan 14, 2024
1 parent 20cd5eb commit 6cbb078
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions crates/fj-core/src/validate/references.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,20 @@ macro_rules! validate_references {
};
}

/// Validation errors for when an object is referenced by multiple other objects. Each object
/// should only be referenced by a single other object
#[derive(Clone, Debug, thiserror::Error)]
pub enum ReferenceCountError {
/// [`Region`] referenced by more than one [`Face`]
/// [`crate::objects::Region`] referenced by more than one [`crate::objects::Face`]
#[error("[`Region`] referenced by more than one [`Face`]")]
Region,
/// [`Face`] referenced by more than one [`crate::objects::Shell`]
#[error("[`Face`] referenced by more than one [`crate::objects::Shell`]")]
/// [`crate::objects::Face`] referenced by more than one [`crate::objects::Shell`]
#[error("[`Face`] referenced by more than one [`Shell`]")]
Face,
/// [`HalfEdge`] referenced by more than one [`Cycle`]
/// [`crate::objects::HalfEdge`] referenced by more than one [`crate::objects::Cycle`]
#[error("[`HalfEdge`] referenced by more than one [`Cycle`]")]
HalfEdge,
/// [`Cycle`] referenced by more than one [`Region`]
/// [`crate::objects::Cycle`] referenced by more than one [`crate::objects::Region`]
#[error("[`Cycle`] referenced by more than one [`Region`]")]
Cycle,
}
2 changes: 1 addition & 1 deletion crates/fj-core/src/validate/sketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub enum SketchValidationError {
#[error("[`Cycle`] referenced by more than one [`Region`]")]
CycleMultipleReferences,
/// Object within sketch referenced by more than one other object
#[error("Object referenced by more than one other Objects")]
#[error("Object within sketch referenced by more than one other Object")]
MultipleReferences(#[from] ReferenceCountError),
}

Expand Down
4 changes: 2 additions & 2 deletions crates/fj-core/src/validate/solid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ pub enum SolidValidationError {
position_b: Point<3>,
},

/// Object within sketch referenced by more than one other object
#[error("Object referenced by more than one other Objects")]
/// Object within solid referenced by more than one other object
#[error("Object within solid referenced by more than one other Object")]
MultipleReferences(#[from] ReferenceCountError),
}

Expand Down

0 comments on commit 6cbb078

Please sign in to comment.