diff options
| author | Hunter Kvalevog <hunter@kvog.sh> | 2026-09-19 17:44:02 -0500 |
|---|---|---|
| committer | Hunter Kvalevog <hunter@kvog.sh> | 2026-09-19 17:44:02 -0500 |
| commit | 13c7b05a26b78cb63bed5d2afdf8eb927197286e (patch) | |
| tree | 29ae22718398ef3c1d605ea8725ebbac9c8b4ac3 /rustlings/exercises/07_structs/structs2.rs | |
| parent | 4791a7ab0400713568f8c9594d9ac2bac10cd8ae (diff) | |
rustlings: complete 07
Diffstat (limited to 'rustlings/exercises/07_structs/structs2.rs')
| -rw-r--r-- | rustlings/exercises/07_structs/structs2.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rustlings/exercises/07_structs/structs2.rs b/rustlings/exercises/07_structs/structs2.rs index 79141af..2539e31 100644 --- a/rustlings/exercises/07_structs/structs2.rs +++ b/rustlings/exercises/07_structs/structs2.rs @@ -33,8 +33,11 @@ mod tests { fn your_order() { let order_template = create_order_template(); - // TODO: Create your own order using the update syntax and template above! - // let your_order = + let your_order = Order { + name: String::from("Hacker in Rust"), + count: 1, + ..order_template + }; assert_eq!(your_order.name, "Hacker in Rust"); assert_eq!(your_order.year, order_template.year); |