Skip to content

Commit

Permalink
std::vec::bytes: remove the reference to overlapping src and dest in
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
huonw committed Dec 16, 2013
1 parent d0ae820 commit 5c147cc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/libstd/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5c147cc

Please sign in to comment.