Skip to content

Commit

Permalink
Style change
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton committed Jul 18, 2024
1 parent 939ee38 commit 8e4a920
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/std/src/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Packet<'scope, T>> = Arc::new(Packet {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 8e4a920

Please sign in to comment.