fix nitpicks from review
This commit is contained in:
@@ -2209,7 +2209,7 @@ pub(crate) fn is_nonoverlapping<T>(src: *const T, dst: *const T, count: usize) -
|
|||||||
/// dst.reserve(src_len);
|
/// dst.reserve(src_len);
|
||||||
///
|
///
|
||||||
/// unsafe {
|
/// unsafe {
|
||||||
/// // The call to offset is always safe because `Vec` will never
|
/// // The call to add is always safe because `Vec` will never
|
||||||
/// // allocate more than `isize::MAX` bytes.
|
/// // allocate more than `isize::MAX` bytes.
|
||||||
/// let dst_ptr = dst.as_mut_ptr().add(dst_len);
|
/// let dst_ptr = dst.as_mut_ptr().add(dst_len);
|
||||||
/// let src_ptr = src.as_ptr();
|
/// let src_ptr = src.as_ptr();
|
||||||
|
|||||||
@@ -1554,7 +1554,7 @@ impl<T> AtomicPtr<T> {
|
|||||||
/// Offsets the pointer's address by adding `val` *bytes*, returning the
|
/// Offsets the pointer's address by adding `val` *bytes*, returning the
|
||||||
/// previous pointer.
|
/// previous pointer.
|
||||||
///
|
///
|
||||||
/// This is equivalent to using [`wrapping_add`] and [`cast`] to atomically
|
/// This is equivalent to using [`wrapping_byte_add`] to atomically
|
||||||
/// perform `ptr = ptr.wrapping_byte_add(val)`.
|
/// perform `ptr = ptr.wrapping_byte_add(val)`.
|
||||||
///
|
///
|
||||||
/// `fetch_byte_add` takes an [`Ordering`] argument which describes the
|
/// `fetch_byte_add` takes an [`Ordering`] argument which describes the
|
||||||
@@ -1565,8 +1565,7 @@ impl<T> AtomicPtr<T> {
|
|||||||
/// **Note**: This method is only available on platforms that support atomic
|
/// **Note**: This method is only available on platforms that support atomic
|
||||||
/// operations on [`AtomicPtr`].
|
/// operations on [`AtomicPtr`].
|
||||||
///
|
///
|
||||||
/// [`wrapping_add`]: pointer::wrapping_add
|
/// [`wrapping_byte_add`]: pointer::wrapping_byte_add
|
||||||
/// [`cast`]: pointer::cast
|
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
@@ -1591,7 +1590,7 @@ impl<T> AtomicPtr<T> {
|
|||||||
/// Offsets the pointer's address by subtracting `val` *bytes*, returning the
|
/// Offsets the pointer's address by subtracting `val` *bytes*, returning the
|
||||||
/// previous pointer.
|
/// previous pointer.
|
||||||
///
|
///
|
||||||
/// This is equivalent to using [`wrapping_sub`] and [`cast`] to atomically
|
/// This is equivalent to using [`wrapping_byte_sub`] to atomically
|
||||||
/// perform `ptr = ptr.wrapping_byte_sub(val)`.
|
/// perform `ptr = ptr.wrapping_byte_sub(val)`.
|
||||||
///
|
///
|
||||||
/// `fetch_byte_sub` takes an [`Ordering`] argument which describes the
|
/// `fetch_byte_sub` takes an [`Ordering`] argument which describes the
|
||||||
@@ -1602,8 +1601,7 @@ impl<T> AtomicPtr<T> {
|
|||||||
/// **Note**: This method is only available on platforms that support atomic
|
/// **Note**: This method is only available on platforms that support atomic
|
||||||
/// operations on [`AtomicPtr`].
|
/// operations on [`AtomicPtr`].
|
||||||
///
|
///
|
||||||
/// [`wrapping_sub`]: pointer::wrapping_sub
|
/// [`wrapping_byte_sub`]: pointer::wrapping_byte_sub
|
||||||
/// [`cast`]: pointer::cast
|
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user