Merge pull request #2300 from hannobraun/validation

Make small cleanups in validation code
This commit is contained in:
Hanno Braun 2024-03-27 11:20:15 +01:00 committed by GitHub
commit 4699d6d29d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 13 deletions

View File

@ -15,7 +15,3 @@ impl Validate for HalfEdge {
) { ) {
} }
} }
/// [`HalfEdge`] validation failed
#[derive(Clone, Debug, thiserror::Error)]
pub enum EdgeValidationError {}

View File

@ -63,8 +63,8 @@
mod curve; mod curve;
mod cycle; mod cycle;
mod edge;
mod face; mod face;
mod half_edge;
mod references; mod references;
mod region; mod region;
mod shell; mod shell;
@ -79,8 +79,8 @@ use crate::{
}; };
pub use self::{ pub use self::{
edge::EdgeValidationError, shell::ShellValidationError, shell::ShellValidationError, sketch::SketchValidationError,
sketch::SketchValidationError, solid::SolidValidationError, solid::SolidValidationError,
}; };
/// Assert that some object has a validation error which matches a specific /// Assert that some object has a validation error which matches a specific

View File

@ -1,8 +1,7 @@
use std::{convert::Infallible, fmt}; use std::{convert::Infallible, fmt};
use crate::validate::{ use crate::validate::{
EdgeValidationError, ShellValidationError, SketchValidationError, ShellValidationError, SketchValidationError, SolidValidationError,
SolidValidationError,
}; };
use super::checks::{ use super::checks::{
@ -25,10 +24,6 @@ pub enum ValidationError {
#[error(transparent)] #[error(transparent)]
InteriorCycleHasInvalidWinding(#[from] InteriorCycleHasInvalidWinding), InteriorCycleHasInvalidWinding(#[from] InteriorCycleHasInvalidWinding),
/// `Edge` validation error
#[error("`Edge` validation error")]
Edge(#[from] EdgeValidationError),
/// `Shell` validation error /// `Shell` validation error
#[error("`Shell` validation error")] #[error("`Shell` validation error")]
Shell(#[from] ShellValidationError), Shell(#[from] ShellValidationError),