summaryrefslogtreecommitdiffstats
path: root/src/doc/book/listings/ch18-patterns-and-matching/listing-18-15/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/book/listings/ch18-patterns-and-matching/listing-18-15/src/main.rs')
-rw-r--r--src/doc/book/listings/ch18-patterns-and-matching/listing-18-15/src/main.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/doc/book/listings/ch18-patterns-and-matching/listing-18-15/src/main.rs b/src/doc/book/listings/ch18-patterns-and-matching/listing-18-15/src/main.rs
index 9b8dac193..4ddef0aaf 100644
--- a/src/doc/book/listings/ch18-patterns-and-matching/listing-18-15/src/main.rs
+++ b/src/doc/book/listings/ch18-patterns-and-matching/listing-18-15/src/main.rs
@@ -10,18 +10,18 @@ fn main() {
match msg {
Message::Quit => {
- println!("The Quit variant has no data to destructure.")
+ println!("The Quit variant has no data to destructure.");
}
Message::Move { x, y } => {
println!(
- "Move in the x direction {} and in the y direction {}",
- x, y
+ "Move in the x direction {x} and in the y direction {y}"
);
}
- Message::Write(text) => println!("Text message: {}", text),
+ Message::Write(text) => {
+ println!("Text message: {text}");
+ }
Message::ChangeColor(r, g, b) => println!(
- "Change the color to red {}, green {}, and blue {}",
- r, g, b
+ "Change the color to red {r}, green {g}, and blue {b}",
),
}
}