From c13271897d849f806a27df14060cd9223e098e67 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Fri, 19 Apr 2024 15:40:41 -0400 Subject: [PATCH] Inline fmt lints for `redirects/` I couldn't find any documentation of how `redirects/` dir is being used, but fixed inlined format args for consistency --- redirects/choosing-your-guarantees.md | 2 +- redirects/iterators.md | 2 +- redirects/lifetimes.md | 2 +- redirects/mutability.md | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/redirects/choosing-your-guarantees.md b/redirects/choosing-your-guarantees.md index 3667258c66..d8a4e3a3f9 100644 --- a/redirects/choosing-your-guarantees.md +++ b/redirects/choosing-your-guarantees.md @@ -7,7 +7,7 @@ ```rust let b = Box::new(5); -println!("b = {}", b); +println!("b = {b}"); ``` --- diff --git a/redirects/iterators.md b/redirects/iterators.md index 26cb047668..d8a73dab87 100644 --- a/redirects/iterators.md +++ b/redirects/iterators.md @@ -11,7 +11,7 @@ let v1 = vec![1, 2, 3]; let v1_iter = v1.iter(); for val in v1_iter { - println!("Got: {}", val); + println!("Got: {val}"); } ``` diff --git a/redirects/lifetimes.md b/redirects/lifetimes.md index 21ddb38ce8..8a27ec1724 100644 --- a/redirects/lifetimes.md +++ b/redirects/lifetimes.md @@ -11,7 +11,7 @@ // | let r = &x; // --+--+-- 'a // | | - println!("r: {}", r); // | | + println!("r: {r}"); // | | // --+ | } // -----+ ``` diff --git a/redirects/mutability.md b/redirects/mutability.md index 89fc3b6f56..4e64953c10 100644 --- a/redirects/mutability.md +++ b/redirects/mutability.md @@ -6,9 +6,9 @@ ```rust let mut x = 5; -println!("The value of x is: {}", x); +println!("The value of x is: {x}"); x = 6; -println!("The value of x is: {}", x); +println!("The value of x is: {x}"); ``` ---