From 8e4a9205e9fc0a86695799042e6fb70756bbfea2 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Thu, 18 Jul 2024 18:10:36 +0000 Subject: [PATCH] Style change --- library/std/src/thread/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index 13b02cd8d3abe..f3d20026c27b1 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -487,7 +487,7 @@ impl Builder { amt }); - let my_thread = name.map_or_else(Thread::new_unnamed, |name| Thread::new(name.into())); + let my_thread = name.map_or_else(Thread::new_unnamed, Thread::new); let their_thread = my_thread.clone(); let my_packet: Arc> = Arc::new(Packet { @@ -1336,8 +1336,8 @@ pub struct Thread { impl Thread { /// Used only internally to construct a thread object without spawning. - pub(crate) fn new(name: ThreadNameString) -> Thread { - Self::new_inner(ThreadName::Other(name)) + pub(crate) fn new(name: String) -> Thread { + Self::new_inner(ThreadName::Other(name.into())) } pub(crate) fn new_unnamed() -> Thread {