Derive Error for HalfEdgeHasNoSibling

This commit is contained in:
Hanno Braun 2024-05-21 21:37:31 +02:00
parent f2bf1ede75
commit a06a8c0102
2 changed files with 3 additions and 2 deletions

View File

@ -39,7 +39,7 @@ impl Validate for Shell {
#[derive(Clone, Debug, thiserror::Error)] #[derive(Clone, Debug, thiserror::Error)]
pub enum ShellValidationError { pub enum ShellValidationError {
/// [`Shell`] contains a half-edge that is not part of a pair /// [`Shell`] contains a half-edge that is not part of a pair
#[error("Half-edge has no sibling: {:#?}", .0.half_edge)] #[error(transparent)]
HalfEdgeHasNoSibling(HalfEdgeHasNoSibling), HalfEdgeHasNoSibling(HalfEdgeHasNoSibling),
/// [`Shell`] contains half-edges that are coincident, but aren't siblings /// [`Shell`] contains half-edges that are coincident, but aren't siblings

View File

@ -11,7 +11,8 @@ use crate::{storage::Handle, topology::HalfEdge};
/// - If the shell is closed, that its topological object graph is not valid. /// - If the shell is closed, that its topological object graph is not valid.
/// ///
/// [`Shell`]: crate::topology::Shell /// [`Shell`]: crate::topology::Shell
#[derive(Clone, Debug)] #[derive(Clone, Debug, thiserror::Error)]
#[error("Half-edge has no sibling: {half_edge:#?}")]
pub struct HalfEdgeHasNoSibling { pub struct HalfEdgeHasNoSibling {
/// The half-edge that does not have a sibling /// The half-edge that does not have a sibling
pub half_edge: Handle<HalfEdge>, pub half_edge: Handle<HalfEdge>,