Skip to content

Commit fa6401b

Browse files
estebankgitbot
authored and
gitbot
committed
Remove some unnecessary .into() calls
1 parent 309085e commit fa6401b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

alloc/src/rc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,7 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
17891789
/// let x: Rc<&str> = Rc::new("Hello, world!");
17901790
/// {
17911791
/// let s = String::from("Oh, no!");
1792-
/// let mut y: Rc<&str> = x.clone().into();
1792+
/// let mut y: Rc<&str> = x.clone();
17931793
/// unsafe {
17941794
/// // this is Undefined Behavior, because x's inner type
17951795
/// // is &'long str, not &'short str

alloc/src/sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2468,7 +2468,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
24682468
/// let x: Arc<&str> = Arc::new("Hello, world!");
24692469
/// {
24702470
/// let s = String::from("Oh, no!");
2471-
/// let mut y: Arc<&str> = x.clone().into();
2471+
/// let mut y: Arc<&str> = x.clone();
24722472
/// unsafe {
24732473
/// // this is Undefined Behavior, because x's inner type
24742474
/// // is &'long str, not &'short str

std/src/thread/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ impl Builder {
502502

503503
let id = ThreadId::new();
504504
let my_thread = match name {
505-
Some(name) => Thread::new(id, name.into()),
505+
Some(name) => Thread::new(id, name),
506506
None => Thread::new_unnamed(id),
507507
};
508508

0 commit comments

Comments
 (0)