From c43129f8374bc5e058efbc8c6a7f143df1d3754f Mon Sep 17 00:00:00 2001 From: T-O-R-U-S Date: Sat, 12 Feb 2022 23:16:17 +0400 Subject: [PATCH] Use implicit capture syntax in format_args This updates the standard library's documentation to use the new syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored). --- crates/core_simd/examples/nbody.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/core_simd/examples/nbody.rs b/crates/core_simd/examples/nbody.rs index 7b1e6840f642..b16b952f71e8 100644 --- a/crates/core_simd/examples/nbody.rs +++ b/crates/core_simd/examples/nbody.rs @@ -187,7 +187,7 @@ mod tests { fn main() { { let (energy_before, energy_after) = nbody::run(1000); - println!("Energy before: {}", energy_before); - println!("Energy after: {}", energy_after); + println!("Energy before: {energy_before}"); + println!("Energy after: {energy_after}"); } }