about summary refs log tree commit diff
diff options
context:
space:
mode:
authorT-O-R-U-S <bageliq@protonmail.com>2022-02-12 23:16:17 +0400
committerMark Rousskov <mark.simulacrum@gmail.com>2022-03-10 10:23:40 -0500
commitc43129f8374bc5e058efbc8c6a7f143df1d3754f (patch)
treefebb2e05ed77c80e9a575ed992c7bc6abe76e33f
parent700972b1a37737274da1a0932fa51b66a003b19c (diff)
downloadrust-c43129f8374bc5e058efbc8c6a7f143df1d3754f.tar.gz
rust-c43129f8374bc5e058efbc8c6a7f143df1d3754f.zip
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).
-rw-r--r--crates/core_simd/examples/nbody.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/core_simd/examples/nbody.rs b/crates/core_simd/examples/nbody.rs
index 7b1e6840f64..b16b952f71e 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}");
     }
 }