Rust is bad in the description, solutions must be explained to the description
struct Shape { id: u32, color: Color, kind: ShapeKind } enum ShapeKind { Circle { r: f64 }, Rect { w: f64, h: f64 } } match shape.kind { ShapeKind::Circle {..} ... } Brother, it makes you write a lot of lines to reach…