fix safety-related comment in slice::rotate
This commit is contained in:
parent
12ed235adc
commit
16c057256f
1 changed files with 1 additions and 1 deletions
|
|
@ -48,7 +48,6 @@ impl<T> RawArray<T> {
|
|||
/// # Safety
|
||||
///
|
||||
/// The specified range must be valid for reading and writing.
|
||||
/// The type `T` must have non-zero size.
|
||||
///
|
||||
/// # Algorithm
|
||||
///
|
||||
|
|
@ -73,6 +72,7 @@ pub unsafe fn ptr_rotate<T>(mut left: usize, mid: *mut T, mut right: usize) {
|
|||
loop {
|
||||
let delta = cmp::min(left, right);
|
||||
if delta <= RawArray::<T>::cap() {
|
||||
// We will always hit this immediately for ZST.
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue