Fix documentation for slice()
Fixes https://github.com/mozilla/rust/issues/14577
This commit is contained in:
parent
ae9577052d
commit
7d07a1e74b
2 changed files with 4 additions and 4 deletions
|
@ -782,11 +782,11 @@ impl<T> Vec<T> {
|
|||
self.as_mut_slice().sort_by(compare)
|
||||
}
|
||||
|
||||
/// Returns a slice of `self` between `start` and `end`.
|
||||
/// Returns a slice of self spanning the interval [`start`, `end`).
|
||||
///
|
||||
/// # Failure
|
||||
///
|
||||
/// Fails when `start` or `end` point outside the bounds of `self`, or when
|
||||
/// Fails when the slice (or part of it) is outside the bounds of self, or when
|
||||
/// `start` > `end`.
|
||||
///
|
||||
/// # Example
|
||||
|
|
|
@ -366,9 +366,9 @@ impl<T> Container for ~[T] {
|
|||
/// Extension methods for vectors
|
||||
pub trait ImmutableVector<'a, T> {
|
||||
/**
|
||||
* Returns a slice of self between `start` and `end`.
|
||||
* Returns a slice of self spanning the interval [`start`, `end`).
|
||||
*
|
||||
* Fails when `start` or `end` point outside the bounds of self,
|
||||
* Fails when the slice (or part of it) is outside the bounds of self,
|
||||
* or when `start` > `end`.
|
||||
*/
|
||||
fn slice(&self, start: uint, end: uint) -> &'a [T];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue