summaryrefslogtreecommitdiff
path: root/examples/02-sum/output/rust/src/main.rs
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-14 19:01:50 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-14 19:01:50 +0100
commit92bbc3595c39e964160660a2de9aa76b72ce727f (patch)
tree00979e144541fd594145e52fc92874b244cd2352 /examples/02-sum/output/rust/src/main.rs
parent6194d284f5559acc5f23a402f577bac655878f92 (diff)
Convert Rust examples to use cargo test
Diffstat (limited to 'examples/02-sum/output/rust/src/main.rs')
-rw-r--r--examples/02-sum/output/rust/src/main.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/examples/02-sum/output/rust/src/main.rs b/examples/02-sum/output/rust/src/main.rs
deleted file mode 100644
index 010ea2a..0000000
--- a/examples/02-sum/output/rust/src/main.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-mod shapes;
-
-use shapes::{Rectangle, Shape, Triangle};
-
-fn main() {
- let shape = create_shape();
-
- let area = match shape {
- Shape::Rectangle(rectangle) => rectangle.width * rectangle.height,
- Shape::Triangle(triangle) => triangle.width * triangle.height / 2,
- };
-}
-
-fn create_shape() -> Shape {
- Shape::Rectangle(Rectangle { width: 10, height: 25 })
-}