Skip to content

Commit b77d31a

Browse files
author
Russell Mackenzie
committed
Add mention of None as possible return. Closes #40435.
1 parent 4853584 commit b77d31a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcollections/slice.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl<T> [T] {
230230
core_slice::SliceExt::first_mut(self)
231231
}
232232

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

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

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

288288
}
289289

290-
/// Returns the last and all the rest of the elements of a slice.
290+
/// Returns the last and all the rest of the elements of a slice, or `None` if it is empty.
291291
///
292292
/// # Examples
293293
///

0 commit comments

Comments
 (0)