diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-08-10 10:19:49 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-08-10 10:19:49 +0100 |
| commit | 5113f2157c5aa257ad7ebf555cb6a551701d169a (patch) | |
| tree | 8ddaee09f6c43b0529b2203f9e662a028fb5fcc0 /examples/13-custom-code/output/rust/src | |
| parent | 5d41166750e0f05da436bf30c7a642749f7a71c5 (diff) | |
Add generic struct example without any outputs
Diffstat (limited to 'examples/13-custom-code/output/rust/src')
| -rw-r--r-- | examples/13-custom-code/output/rust/src/gen/shapes.rs | 6 | ||||
| -rw-r--r-- | examples/13-custom-code/output/rust/src/lib.rs | 12 | ||||
| -rw-r--r-- | examples/13-custom-code/output/rust/src/shapes.rs | 7 |
3 files changed, 0 insertions, 25 deletions
diff --git a/examples/13-custom-code/output/rust/src/gen/shapes.rs b/examples/13-custom-code/output/rust/src/gen/shapes.rs deleted file mode 100644 index d1582ad..0000000 --- a/examples/13-custom-code/output/rust/src/gen/shapes.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Generated by hobgoblin. - -#[derive(Clone, Debug, Hash, PartialEq)] -pub struct Square { - pub width: ::core::primitive::i32, -} diff --git a/examples/13-custom-code/output/rust/src/lib.rs b/examples/13-custom-code/output/rust/src/lib.rs deleted file mode 100644 index 1825d72..0000000 --- a/examples/13-custom-code/output/rust/src/lib.rs +++ /dev/null @@ -1,12 +0,0 @@ -mod shapes; - -#[cfg(test)] -mod test { - use super::shapes::Square; - - #[test] - fn can_use_custom_code() { - let square = Square { width: 10 }; - assert_eq!(square.area(), 100); - } -} diff --git a/examples/13-custom-code/output/rust/src/shapes.rs b/examples/13-custom-code/output/rust/src/shapes.rs deleted file mode 100644 index f806bbb..0000000 --- a/examples/13-custom-code/output/rust/src/shapes.rs +++ /dev/null @@ -1,7 +0,0 @@ -include!("gen/shapes.rs"); - -impl Square { - pub fn area(&self) -> i32 { - self.width * self.width - } -} |
