diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-07-31 13:57:06 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-07-31 13:57:06 +0100 |
| commit | f8c4b8f33d3da5a943bfa29a14abdb3484122083 (patch) | |
| tree | 2516e74fe6a3f13199c2d407ce106db41e1ead7a /examples/03-sum/output/rust/src | |
| parent | e5c27bcaf0e577f5b94c663f36ddc101ef1432ce (diff) | |
Add Clone and Copy to generated Rust types
Diffstat (limited to 'examples/03-sum/output/rust/src')
| -rw-r--r-- | examples/03-sum/output/rust/src/shapes.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/03-sum/output/rust/src/shapes.rs b/examples/03-sum/output/rust/src/shapes.rs index a0a9b7f..2712e41 100644 --- a/examples/03-sum/output/rust/src/shapes.rs +++ b/examples/03-sum/output/rust/src/shapes.rs @@ -1,7 +1,7 @@ // Generated by hobgoblin. /// A 2D shape. -#[derive(Debug, Hash, PartialEq)] +#[derive(Clone, Debug, Hash, PartialEq)] pub enum Shape { Rectangle(crate::shapes::Rectangle), Triangle(crate::shapes::Triangle), @@ -19,13 +19,13 @@ impl ::std::convert::From::<crate::shapes::Triangle> for crate::shapes::Shape { } } -#[derive(Debug, Hash, PartialEq)] +#[derive(Clone, Debug, Hash, PartialEq)] pub struct Rectangle { pub width: ::core::primitive::i32, pub height: ::core::primitive::i32, } -#[derive(Debug, Hash, PartialEq)] +#[derive(Clone, Debug, Hash, PartialEq)] pub struct Triangle { pub width: ::core::primitive::i32, pub height: ::core::primitive::i32, |
