summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exercises/01_variables/variables5.rs2
-rw-r--r--solutions/01_variables/variables5.rs2
-rw-r--r--solutions/22_clippy/clippy3.rs4
3 files changed, 4 insertions, 4 deletions
diff --git a/exercises/01_variables/variables5.rs b/exercises/01_variables/variables5.rs
index 49db8e9..cf5620d 100644
--- a/exercises/01_variables/variables5.rs
+++ b/exercises/01_variables/variables5.rs
@@ -1,6 +1,6 @@
fn main() {
let number = "T-H-R-E-E"; // Don't change this line
- println!("Spell a number: {}", number);
+ println!("Spell a number: {number}");
// TODO: Fix the compiler error by changing the line below without renaming the variable.
number = 3;
diff --git a/solutions/01_variables/variables5.rs b/solutions/01_variables/variables5.rs
index 9057754..0ea3903 100644
--- a/solutions/01_variables/variables5.rs
+++ b/solutions/01_variables/variables5.rs
@@ -1,6 +1,6 @@
fn main() {
let number = "T-H-R-E-E";
- println!("Spell a number: {}", number);
+ println!("Spell a number: {number}");
// Using variable shadowing
// https://doc.rust-lang.org/book/ch03-01-variables-and-mutability.html#shadowing
diff --git a/solutions/22_clippy/clippy3.rs b/solutions/22_clippy/clippy3.rs
index b7eaa57..81f381e 100644
--- a/solutions/22_clippy/clippy3.rs
+++ b/solutions/22_clippy/clippy3.rs
@@ -15,7 +15,7 @@ fn main() {
-1, -2, -3,
-4, -5, -6,
];
- println!("My array! Here it is: {:?}", my_arr);
+ println!("My array! Here it is: {my_arr:?}");
let mut my_empty_vec = vec![1, 2, 3, 4, 5];
// `resize` mutates a vector instead of returning a new one.
@@ -27,5 +27,5 @@ fn main() {
let mut value_b = 66;
// Use `mem::swap` to correctly swap two values.
mem::swap(&mut value_a, &mut value_b);
- println!("value a: {}; value b: {}", value_a, value_b);
+ println!("value a: {value_a}; value b: {value_b}");
}