summaryrefslogtreecommitdiffstats
path: root/src/doc/book/listings/ch18-patterns-and-matching/listing-18-14
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:11:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:12:43 +0000
commitcf94bdc0742c13e2a0cac864c478b8626b266e1b (patch)
tree044670aa50cc5e2b4229aa0b6b3df6676730c0a6 /src/doc/book/listings/ch18-patterns-and-matching/listing-18-14
parentAdding debian version 1.65.0+dfsg1-2. (diff)
downloadrustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.tar.xz
rustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.zip
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/doc/book/listings/ch18-patterns-and-matching/listing-18-14')
-rw-r--r--src/doc/book/listings/ch18-patterns-and-matching/listing-18-14/src/main.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/doc/book/listings/ch18-patterns-and-matching/listing-18-14/src/main.rs b/src/doc/book/listings/ch18-patterns-and-matching/listing-18-14/src/main.rs
index 8d445d9b9..b71da9a37 100644
--- a/src/doc/book/listings/ch18-patterns-and-matching/listing-18-14/src/main.rs
+++ b/src/doc/book/listings/ch18-patterns-and-matching/listing-18-14/src/main.rs
@@ -8,9 +8,11 @@ fn main() {
let p = Point { x: 0, y: 7 };
match p {
- Point { x, y: 0 } => println!("On the x axis at {}", x),
- Point { x: 0, y } => println!("On the y axis at {}", y),
- Point { x, y } => println!("On neither axis: ({}, {})", x, y),
+ Point { x, y: 0 } => println!("On the x axis at {x}"),
+ Point { x: 0, y } => println!("On the y axis at {y}"),
+ Point { x, y } => {
+ println!("On neither axis: ({x}, {y})");
+ }
}
}
// ANCHOR_END: here