diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-01-08 21:18:46 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-01-08 21:19:28 +0000 |
| commit | eb917ea24deeeb92ab76fcb215aac4c7a567644d (patch) | |
| tree | a5e75bc8e25bb793fd283e3276c18829ed5c8817 /library/alloc/src | |
| parent | a580b5c379b4fca50dfe5afc0fc0ce00921e4e00 (diff) | |
| download | rust-eb917ea24deeeb92ab76fcb215aac4c7a567644d.tar.gz rust-eb917ea24deeeb92ab76fcb215aac4c7a567644d.zip | |
Remove some unnecessary `.into()` calls
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/rc.rs | 2 | ||||
| -rw-r--r-- | library/alloc/src/sync.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index e014404eff3..08a7b325798 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -1789,7 +1789,7 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> { /// let x: Rc<&str> = Rc::new("Hello, world!"); /// { /// let s = String::from("Oh, no!"); - /// let mut y: Rc<&str> = x.clone().into(); + /// let mut y: Rc<&str> = x.clone(); /// unsafe { /// // this is Undefined Behavior, because x's inner type /// // is &'long str, not &'short str diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index b34a6d3f660..30761739dbf 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -2468,7 +2468,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> { /// let x: Arc<&str> = Arc::new("Hello, world!"); /// { /// let s = String::from("Oh, no!"); - /// let mut y: Arc<&str> = x.clone().into(); + /// let mut y: Arc<&str> = x.clone(); /// unsafe { /// // this is Undefined Behavior, because x's inner type /// // is &'long str, not &'short str |
