about summary refs log tree commit diff
path: root/library/std/src/os/unix/net/ancillary.rs
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
commit72a25d05bf1a4b155d74139ef700ff93af6d8e22 (patch)
tree3f143b29a3a51b68e9b29d93e47fb0b0968ad3df /library/std/src/os/unix/net/ancillary.rs
parentba14a836c7038da21f5e102aacc7e6d5964f79a6 (diff)
downloadrust-72a25d05bf1a4b155d74139ef700ff93af6d8e22.tar.gz
rust-72a25d05bf1a4b155d74139ef700ff93af6d8e22.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).
Diffstat (limited to 'library/std/src/os/unix/net/ancillary.rs')
-rw-r--r--library/std/src/os/unix/net/ancillary.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/os/unix/net/ancillary.rs b/library/std/src/os/unix/net/ancillary.rs
index 6e6f5212b46..fb1ff4b725c 100644
--- a/library/std/src/os/unix/net/ancillary.rs
+++ b/library/std/src/os/unix/net/ancillary.rs
@@ -396,7 +396,7 @@ impl<'a> Iterator for Messages<'a> {
 ///     for ancillary_result in ancillary.messages() {
 ///         if let AncillaryData::ScmRights(scm_rights) = ancillary_result.unwrap() {
 ///             for fd in scm_rights {
-///                 println!("receive file descriptor: {}", fd);
+///                 println!("receive file descriptor: {fd}");
 ///             }
 ///         }
 ///     }
@@ -568,7 +568,7 @@ impl<'a> SocketAncillary<'a> {
     ///     for ancillary_result in ancillary.messages() {
     ///         if let AncillaryData::ScmRights(scm_rights) = ancillary_result.unwrap() {
     ///             for fd in scm_rights {
-    ///                 println!("receive file descriptor: {}", fd);
+    ///                 println!("receive file descriptor: {fd}");
     ///             }
     ///         }
     ///     }
@@ -579,7 +579,7 @@ impl<'a> SocketAncillary<'a> {
     ///     for ancillary_result in ancillary.messages() {
     ///         if let AncillaryData::ScmRights(scm_rights) = ancillary_result.unwrap() {
     ///             for fd in scm_rights {
-    ///                 println!("receive file descriptor: {}", fd);
+    ///                 println!("receive file descriptor: {fd}");
     ///             }
     ///         }
     ///     }