diff options
| author | Ralf Jung <post@ralfj.de> | 2019-02-22 22:47:30 +0100 | 
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-02-22 23:05:58 +0100 | 
| commit | d10366fe27bf1a1e6ab67076bdc268f486abeb88 (patch) | |
| tree | f3b6a30176b3748fb131cb795e346c4a42b9101b /src/libcore/ptr.rs | |
| parent | 084ee7a875cb02c0f0c0c6d1ffaff81d69cec74e (diff) | |
| download | rust-d10366fe27bf1a1e6ab67076bdc268f486abeb88.tar.gz rust-d10366fe27bf1a1e6ab67076bdc268f486abeb88.zip | |
avoid unnecessary use of MaybeUninit::get_ref, and expand comment on the others
Diffstat (limited to 'src/libcore/ptr.rs')
| -rw-r--r-- | src/libcore/ptr.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs index 866c8d0896b..a2599ae834c 100644 --- a/src/libcore/ptr.rs +++ b/src/libcore/ptr.rs @@ -301,7 +301,7 @@ pub unsafe fn swap<T>(x: *mut T, y: *mut T) { // Perform the swap copy_nonoverlapping(x, tmp.as_mut_ptr(), 1); copy(y, x, 1); // `x` and `y` may overlap - copy_nonoverlapping(tmp.get_ref(), y, 1); + copy_nonoverlapping(tmp.as_ptr(), y, 1); } /// Swaps `count * size_of::<T>()` bytes between the two regions of memory | 
