1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-12-14 20:36:04 +02:00

Updates and minor fixes to Day 2: Morning (#372)

This commit is contained in:
Marko Zagar
2023-02-09 21:15:47 +00:00
committed by GitHub
parent e3b4b6a5c7
commit 36ce63cb10
5 changed files with 10 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ fn main() {
let foo = Foo { x: (1, 2), y: 3 };
match foo {
Foo { x: (1, b), y } => println!("x.0 = 1, b = {b}, y = {y}"),
Foo { y: 2, x: i } => println!("y = 2, i = {i:?}"),
Foo { y: 2, x: i } => println!("y = 2, x = {i:?}"),
Foo { y, .. } => println!("y = {y}, other fields were ignored"),
}
}