diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-03-19 10:18:23 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-19 10:18:23 -0400 |
| commit | 35cf2f96ce52cdb889470b0e5ff1ab402fcf7c25 (patch) | |
| tree | a417ed30d4c82ace1c5dc251fee03b1e23b0bdc0 | |
| parent | 9e11ecb7507b1d661a47346fe37da85eff548f67 (diff) | |
| parent | b77d31ac61d1772ccfab6f37cb19559adc843466 (diff) | |
Rollup merge of #40646 - russmack:issue-40435-mention-none, r=frewsxcv
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.
| -rw-r--r-- | src/libcollections/slice.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs index 7d3bd1cc569..653310b8cb5 100644 --- a/src/libcollections/slice.rs +++ b/src/libcollections/slice.rs @@ -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 /// @@ -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 /// @@ -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 /// @@ -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 /// |
