mirror of https://github.com/hannobraun/Fornjot
Rename `Validate2` to `Validate`
This completes the transition to the new validation infrastructure.
This commit is contained in:
parent
e996929061
commit
899b401265
|
@ -104,7 +104,7 @@ use crate::{
|
||||||
storage::{Handle, Store},
|
storage::{Handle, Store},
|
||||||
validate::{
|
validate::{
|
||||||
CycleValidationError, FaceValidationError, HalfEdgeValidationError,
|
CycleValidationError, FaceValidationError, HalfEdgeValidationError,
|
||||||
SurfaceVertexValidationError, Validate2, VertexValidationError,
|
SurfaceVertexValidationError, Validate, VertexValidationError,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@ use std::convert::Infallible;
|
||||||
|
|
||||||
use crate::objects::{Curve, GlobalCurve};
|
use crate::objects::{Curve, GlobalCurve};
|
||||||
|
|
||||||
use super::{Validate2, ValidationConfig};
|
use super::{Validate, ValidationConfig};
|
||||||
|
|
||||||
impl Validate2 for Curve {
|
impl Validate for Curve {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
@ -15,7 +15,7 @@ impl Validate2 for Curve {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Validate2 for GlobalCurve {
|
impl Validate for GlobalCurve {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
|
|
@ -5,9 +5,9 @@ use crate::{
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{Validate2, ValidationConfig};
|
use super::{Validate, ValidationConfig};
|
||||||
|
|
||||||
impl Validate2 for Cycle {
|
impl Validate for Cycle {
|
||||||
type Error = CycleValidationError;
|
type Error = CycleValidationError;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
@ -69,7 +69,7 @@ mod tests {
|
||||||
builder::{CycleBuilder, HalfEdgeBuilder, VertexBuilder},
|
builder::{CycleBuilder, HalfEdgeBuilder, VertexBuilder},
|
||||||
objects::{Cycle, Objects},
|
objects::{Cycle, Objects},
|
||||||
partial::HasPartial,
|
partial::HasPartial,
|
||||||
validate::Validate2,
|
validate::Validate,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -11,9 +11,9 @@ use crate::{
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{Validate2, ValidationConfig};
|
use super::{Validate, ValidationConfig};
|
||||||
|
|
||||||
impl Validate2 for HalfEdge {
|
impl Validate for HalfEdge {
|
||||||
type Error = HalfEdgeValidationError;
|
type Error = HalfEdgeValidationError;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
@ -33,7 +33,7 @@ impl Validate2 for HalfEdge {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Validate2 for GlobalEdge {
|
impl Validate for GlobalEdge {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
@ -204,7 +204,7 @@ mod tests {
|
||||||
builder::{HalfEdgeBuilder, VertexBuilder},
|
builder::{HalfEdgeBuilder, VertexBuilder},
|
||||||
objects::{GlobalCurve, HalfEdge, Objects},
|
objects::{GlobalCurve, HalfEdge, Objects},
|
||||||
partial::HasPartial,
|
partial::HasPartial,
|
||||||
validate::Validate2,
|
validate::Validate,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -5,9 +5,9 @@ use crate::{
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{Validate2, ValidationConfig};
|
use super::{Validate, ValidationConfig};
|
||||||
|
|
||||||
impl Validate2 for Face {
|
impl Validate for Face {
|
||||||
type Error = FaceValidationError;
|
type Error = FaceValidationError;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
@ -108,7 +108,7 @@ mod tests {
|
||||||
builder::CycleBuilder,
|
builder::CycleBuilder,
|
||||||
objects::{Cycle, Face, Objects},
|
objects::{Cycle, Face, Objects},
|
||||||
partial::HasPartial,
|
partial::HasPartial,
|
||||||
validate::Validate2,
|
validate::Validate,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -36,7 +36,7 @@ use std::convert::Infallible;
|
||||||
use fj_math::Scalar;
|
use fj_math::Scalar;
|
||||||
|
|
||||||
/// Validate an object
|
/// Validate an object
|
||||||
pub trait Validate2: Sized {
|
pub trait Validate: Sized {
|
||||||
/// The error that validation of the implementing type can result in
|
/// The error that validation of the implementing type can result in
|
||||||
type Error: Into<ValidationError>;
|
type Error: Into<ValidationError>;
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@ use std::convert::Infallible;
|
||||||
|
|
||||||
use crate::objects::Shell;
|
use crate::objects::Shell;
|
||||||
|
|
||||||
use super::{Validate2, ValidationConfig};
|
use super::{Validate, ValidationConfig};
|
||||||
|
|
||||||
impl Validate2 for Shell {
|
impl Validate for Shell {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
|
|
@ -2,9 +2,9 @@ use std::convert::Infallible;
|
||||||
|
|
||||||
use crate::objects::Sketch;
|
use crate::objects::Sketch;
|
||||||
|
|
||||||
use super::{Validate2, ValidationConfig};
|
use super::{Validate, ValidationConfig};
|
||||||
|
|
||||||
impl Validate2 for Sketch {
|
impl Validate for Sketch {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
|
|
@ -2,9 +2,9 @@ use std::convert::Infallible;
|
||||||
|
|
||||||
use crate::objects::Solid;
|
use crate::objects::Solid;
|
||||||
|
|
||||||
use super::{Validate2, ValidationConfig};
|
use super::{Validate, ValidationConfig};
|
||||||
|
|
||||||
impl Validate2 for Solid {
|
impl Validate for Solid {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
|
|
@ -2,9 +2,9 @@ use std::convert::Infallible;
|
||||||
|
|
||||||
use crate::objects::Surface;
|
use crate::objects::Surface;
|
||||||
|
|
||||||
use super::{Validate2, ValidationConfig};
|
use super::{Validate, ValidationConfig};
|
||||||
|
|
||||||
impl Validate2 for Surface {
|
impl Validate for Surface {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
|
|
@ -7,9 +7,9 @@ use crate::{
|
||||||
storage::Handle,
|
storage::Handle,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{Validate2, ValidationConfig};
|
use super::{Validate, ValidationConfig};
|
||||||
|
|
||||||
impl Validate2 for Vertex {
|
impl Validate for Vertex {
|
||||||
type Error = VertexValidationError;
|
type Error = VertexValidationError;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
@ -22,7 +22,7 @@ impl Validate2 for Vertex {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Validate2 for SurfaceVertex {
|
impl Validate for SurfaceVertex {
|
||||||
type Error = SurfaceVertexValidationError;
|
type Error = SurfaceVertexValidationError;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
@ -34,7 +34,7 @@ impl Validate2 for SurfaceVertex {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Validate2 for GlobalVertex {
|
impl Validate for GlobalVertex {
|
||||||
type Error = Infallible;
|
type Error = Infallible;
|
||||||
|
|
||||||
fn validate_with_config(
|
fn validate_with_config(
|
||||||
|
@ -182,7 +182,7 @@ mod tests {
|
||||||
builder::{CurveBuilder, SurfaceVertexBuilder},
|
builder::{CurveBuilder, SurfaceVertexBuilder},
|
||||||
objects::{Curve, GlobalVertex, Objects, SurfaceVertex, Vertex},
|
objects::{Curve, GlobalVertex, Objects, SurfaceVertex, Vertex},
|
||||||
partial::HasPartial,
|
partial::HasPartial,
|
||||||
validate::Validate2,
|
validate::Validate,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in New Issue