control flow, primitive types and vectors

This commit is contained in:
2026-01-13 04:19:05 +00:00
parent 505ab3b606
commit 2cd1c84285
19 changed files with 50 additions and 28 deletions

View File

@@ -34,7 +34,13 @@ mod tests {
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"),
year: 2019,
item_number: 123,
count: 1,
..order_template
};
assert_eq!(your_order.name, "Hacker in Rust");
assert_eq!(your_order.year, order_template.year);