diff options
Diffstat (limited to 'library/std/src/thread')
| -rw-r--r-- | library/std/src/thread/mod.rs | 6 | ||||
| -rw-r--r-- | library/std/src/thread/scoped.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index 74b29454b94..ae292caaed9 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -613,7 +613,7 @@ impl Builder { /// /// let receiver = thread::spawn(move || { /// let value = rx.recv().expect("Unable to receive from channel"); -/// println!("{}", value); +/// println!("{value}"); /// }); /// /// sender.join().expect("The sender thread has panicked"); @@ -633,7 +633,7 @@ impl Builder { /// }); /// /// let result = computation.join().unwrap(); -/// println!("{}", result); +/// println!("{result}"); /// ``` /// /// [`channels`]: crate::sync::mpsc @@ -979,7 +979,7 @@ pub fn park_timeout_ms(ms: u32) { /// if elapsed >= timeout { /// break; /// } -/// println!("restarting park_timeout after {:?}", elapsed); +/// println!("restarting park_timeout after {elapsed:?}"); /// timeout_remaining = timeout - elapsed; /// } /// ``` diff --git a/library/std/src/thread/scoped.rs b/library/std/src/thread/scoped.rs index c4847b529a3..07e113f3b62 100644 --- a/library/std/src/thread/scoped.rs +++ b/library/std/src/thread/scoped.rs @@ -22,7 +22,7 @@ pub struct Scope<'scope, 'env: 'scope> { /// std::thread::scope(|s| { /// s.spawn(|| { /// let a = String::from("abcd"); - /// s.spawn(|| println!("{:?}", a)); // might run after `a` is dropped + /// s.spawn(|| println!("{a:?}")); // might run after `a` is dropped /// }); /// }); /// ``` |
