diff --git a/csg/src/brush.rs b/csg/src/brush.rs index aa526fd..cb26afa 100644 --- a/csg/src/brush.rs +++ b/csg/src/brush.rs @@ -117,14 +117,7 @@ impl Brush { let mut vs: Vec = vec![]; for intersection in &self.raw_vertices { let point = intersection.get_intersection_point(); - let mut duplicate = false; - for v in &vs { - if v.abs_diff_eq(point, math::EPSILON) { - duplicate = true; - break; - } - } - if !duplicate { + if !vs.iter().any(|v| v.abs_diff_eq(point, math::EPSILON)) { vs.push(point); } }