Skip to content

Commit

Permalink
Rollup merge of #40646 - russmack:issue-40435-mention-none, r=frewsxcv
Browse files Browse the repository at this point in the history
Add mention of None as possible return. Closes #40435.

This commit adds a small mention to some methods that None is returned when the slice is empty.
  • Loading branch information
frewsxcv authored Mar 19, 2017
2 parents 9e11ecb + b77d31a commit 35cf2f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libcollections/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ impl<T> [T] {
core_slice::SliceExt::first_mut(self)
}

/// Returns the first and all the rest of the elements of a slice.
/// Returns the first and all the rest of the elements of a slice, or `None` if it is empty.
///
/// # Examples
///
Expand All @@ -248,7 +248,7 @@ impl<T> [T] {
core_slice::SliceExt::split_first(self)
}

/// Returns the first and all the rest of the elements of a slice.
/// Returns the first and all the rest of the elements of a slice, or `None` if it is empty.
///
/// # Examples
///
Expand All @@ -268,7 +268,7 @@ impl<T> [T] {
core_slice::SliceExt::split_first_mut(self)
}

/// Returns the last and all the rest of the elements of a slice.
/// Returns the last and all the rest of the elements of a slice, or `None` if it is empty.
///
/// # Examples
///
Expand All @@ -287,7 +287,7 @@ impl<T> [T] {

}

/// Returns the last and all the rest of the elements of a slice.
/// Returns the last and all the rest of the elements of a slice, or `None` if it is empty.
///
/// # Examples
///
Expand Down

0 comments on commit 35cf2f9

Please sign in to comment.