diff --git a/crates/fj-kernel/src/objects/cycle.rs b/crates/fj-kernel/src/objects/cycle.rs index 78fda9ad8..518064a22 100644 --- a/crates/fj-kernel/src/objects/cycle.rs +++ b/crates/fj-kernel/src/objects/cycle.rs @@ -24,20 +24,14 @@ impl Cycle { pub fn new(half_edges: impl IntoIterator>) -> Self { let half_edges = half_edges.into_iter().collect::>(); - let surface = match half_edges.first() { - Some(half_edge) => half_edge.surface().clone(), - None => panic!("Cycle must contain at least one half-edge"), - }; - - // Verify, that the curves of all edges are defined in the correct - // surface. - for edge in &half_edges { - assert_eq!( - surface.id(), - edge.curve().surface().id(), - "Edges in cycle not defined in same surface" - ); - } + // This is not a validation check, and thus not part of the validation + // infrastructure. The property being checked here is inherent to the + // validity of a `Cycle`, as methods of `Cycle` might assume that there + // is at least one edge. + assert!( + !half_edges.is_empty(), + "Cycle must contain at least one half-edge" + ); if half_edges.len() != 1 { // Verify that all edges connect.