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/08-native-type | |
| parent | e5c27bcaf0e577f5b94c663f36ddc101ef1432ce (diff) | |
Add Clone and Copy to generated Rust types
Diffstat (limited to 'examples/08-native-type')
| -rw-r--r-- | examples/08-native-type/output/rust/src/gen/point.rs | 2 | ||||
| -rw-r--r-- | examples/08-native-type/output/rust/src/point.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/08-native-type/output/rust/src/gen/point.rs b/examples/08-native-type/output/rust/src/gen/point.rs index d383b15..8561605 100644 --- a/examples/08-native-type/output/rust/src/gen/point.rs +++ b/examples/08-native-type/output/rust/src/gen/point.rs @@ -1,7 +1,7 @@ // Generated by hobgoblin. /// A straight line from one point to another. -#[derive(Debug, Hash, PartialEq)] +#[derive(Clone, Debug, Hash, PartialEq)] pub struct Line { pub start: crate::point::Point, pub end: crate::point::Point, diff --git a/examples/08-native-type/output/rust/src/point.rs b/examples/08-native-type/output/rust/src/point.rs index c5b73d7..3c763e2 100644 --- a/examples/08-native-type/output/rust/src/point.rs +++ b/examples/08-native-type/output/rust/src/point.rs @@ -1,4 +1,4 @@ include!("gen/point.rs"); -#[derive(Debug, Hash, PartialEq)] +#[derive(Clone, Debug, Hash, PartialEq)] pub struct Point(pub i32, pub i32); |
