std::vec::bytes: remove the reference to overlapping src and dest in
docs for copy_memory. &mut [u8] and &[u8] really shouldn't be overlapping at all (part of the uniqueness/aliasing guarantee of &mut), so no point in encouraging it.
This commit is contained in:
parent
d0ae820765
commit
5c147cc408
1 changed files with 4 additions and 7 deletions
|
@ -2350,13 +2350,10 @@ pub mod bytes {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Copies data from one vector to another.
|
||||
*
|
||||
* Copies `src` to `dst`. The source and destination may
|
||||
* overlap. Fails if the length of `dst` is less than the length
|
||||
* of `src`.
|
||||
*/
|
||||
/// Copies data from one vector to another.
|
||||
///
|
||||
/// Copies `src` to `dst`. Fails if the length of `dst` is less
|
||||
/// than the length of `src`.
|
||||
#[inline]
|
||||
pub fn copy_memory(dst: &mut [u8], src: &[u8]) {
|
||||
// Bound checks are done at .copy_memory.
|
||||
|
|
Loading…
Reference in a new issue