From 218dfdbae23603786db168c8e8c8710b40e0ab88 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Wed, 16 Mar 2022 15:34:14 +0100 Subject: [PATCH] Update name of enum variant --- fj/src/shape_3d.rs | 10 +++++----- src/kernel/shapes/mod.rs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fj/src/shape_3d.rs b/fj/src/shape_3d.rs index afdd45dc8..800144ca0 100644 --- a/fj/src/shape_3d.rs +++ b/fj/src/shape_3d.rs @@ -4,14 +4,14 @@ use crate::{Shape, Shape2d}; #[derive(Clone, Debug)] #[repr(C)] pub enum Shape3d { + /// The union of two 3-dimensional shapes + Group(Box), + /// A sweep of 2-dimensional shape along the z-axis Sweep(Sweep), /// A transformed 3-dimensional shape Transform(Box), - - /// The union of two 3-dimensional shapes - Union(Box), } impl From for Shape { @@ -40,13 +40,13 @@ pub struct Group { impl From for Shape { fn from(shape: Group) -> Self { - Self::Shape3d(Shape3d::Union(Box::new(shape))) + Self::Shape3d(Shape3d::Group(Box::new(shape))) } } impl From for Shape3d { fn from(shape: Group) -> Self { - Self::Union(Box::new(shape)) + Self::Group(Box::new(shape)) } } diff --git a/src/kernel/shapes/mod.rs b/src/kernel/shapes/mod.rs index b3181a62d..32362eb43 100644 --- a/src/kernel/shapes/mod.rs +++ b/src/kernel/shapes/mod.rs @@ -53,9 +53,9 @@ macro_rules! dispatch { $( fn $method(&self, $($arg_name: $arg_ty,)*) -> $ret { match self { + Self::Group(shape) => shape.$method($($arg_name,)*), Self::Sweep(shape) => shape.$method($($arg_name,)*), Self::Transform(shape) => shape.$method($($arg_name,)*), - Self::Union(shape) => shape.$method($($arg_name,)*), } } )*