@@ -195,7 +195,7 @@ impl<T> [T] {
195
195
core_slice:: SliceExt :: is_empty ( self )
196
196
}
197
197
198
- /// Returns the first element of a slice, or `None` if it is empty.
198
+ /// Returns the first element of the slice, or `None` if it is empty.
199
199
///
200
200
/// # Examples
201
201
///
@@ -212,7 +212,7 @@ impl<T> [T] {
212
212
core_slice:: SliceExt :: first ( self )
213
213
}
214
214
215
- /// Returns a mutable pointer to the first element of a slice, or `None` if it is empty.
215
+ /// Returns a mutable pointer to the first element of the slice, or `None` if it is empty.
216
216
///
217
217
/// # Examples
218
218
///
@@ -230,7 +230,7 @@ impl<T> [T] {
230
230
core_slice:: SliceExt :: first_mut ( self )
231
231
}
232
232
233
- /// Returns the first and all the rest of the elements of a slice, or `None` if it is empty.
233
+ /// Returns the first and all the rest of the elements of the slice, or `None` if it is empty.
234
234
///
235
235
/// # Examples
236
236
///
@@ -248,7 +248,7 @@ impl<T> [T] {
248
248
core_slice:: SliceExt :: split_first ( self )
249
249
}
250
250
251
- /// Returns the first and all the rest of the elements of a slice, or `None` if it is empty.
251
+ /// Returns the first and all the rest of the elements of the slice, or `None` if it is empty.
252
252
///
253
253
/// # Examples
254
254
///
@@ -268,7 +268,7 @@ impl<T> [T] {
268
268
core_slice:: SliceExt :: split_first_mut ( self )
269
269
}
270
270
271
- /// Returns the last and all the rest of the elements of a slice, or `None` if it is empty.
271
+ /// Returns the last and all the rest of the elements of the slice, or `None` if it is empty.
272
272
///
273
273
/// # Examples
274
274
///
@@ -287,7 +287,7 @@ impl<T> [T] {
287
287
288
288
}
289
289
290
- /// Returns the last and all the rest of the elements of a slice, or `None` if it is empty.
290
+ /// Returns the last and all the rest of the elements of the slice, or `None` if it is empty.
291
291
///
292
292
/// # Examples
293
293
///
@@ -307,7 +307,7 @@ impl<T> [T] {
307
307
core_slice:: SliceExt :: split_last_mut ( self )
308
308
}
309
309
310
- /// Returns the last element of a slice, or `None` if it is empty.
310
+ /// Returns the last element of the slice, or `None` if it is empty.
311
311
///
312
312
/// # Examples
313
313
///
@@ -485,7 +485,7 @@ impl<T> [T] {
485
485
core_slice:: SliceExt :: as_mut_ptr ( self )
486
486
}
487
487
488
- /// Swaps two elements in a slice.
488
+ /// Swaps two elements in the slice.
489
489
///
490
490
/// # Arguments
491
491
///
@@ -509,7 +509,7 @@ impl<T> [T] {
509
509
core_slice:: SliceExt :: swap ( self , a, b)
510
510
}
511
511
512
- /// Reverses the order of elements in a slice, in place.
512
+ /// Reverses the order of elements in the slice, in place.
513
513
///
514
514
/// # Example
515
515
///
@@ -955,7 +955,7 @@ impl<T> [T] {
955
955
core_slice:: SliceExt :: ends_with ( self , needle)
956
956
}
957
957
958
- /// Binary search a sorted slice for a given element.
958
+ /// Binary searches this sorted slice for a given element.
959
959
///
960
960
/// If the value is found then `Ok` is returned, containing the
961
961
/// index of the matching element; if the value is not found then
@@ -984,7 +984,7 @@ impl<T> [T] {
984
984
core_slice:: SliceExt :: binary_search ( self , x)
985
985
}
986
986
987
- /// Binary search a sorted slice with a comparator function.
987
+ /// Binary searches this sorted slice with a comparator function.
988
988
///
989
989
/// The comparator function should implement an order consistent
990
990
/// with the sort order of the underlying slice, returning an
@@ -1023,7 +1023,7 @@ impl<T> [T] {
1023
1023
core_slice:: SliceExt :: binary_search_by ( self , f)
1024
1024
}
1025
1025
1026
- /// Binary search a sorted slice with a key extraction function.
1026
+ /// Binary searches this sorted slice with a key extraction function.
1027
1027
///
1028
1028
/// Assumes that the slice is sorted by the key, for instance with
1029
1029
/// [`sort_by_key`] using the same key extraction function.
@@ -1092,7 +1092,7 @@ impl<T> [T] {
1092
1092
merge_sort ( self , |a, b| a. lt ( b) ) ;
1093
1093
}
1094
1094
1095
- /// Sorts the slice using `compare` to compare elements .
1095
+ /// Sorts the slice with a comparator function .
1096
1096
///
1097
1097
/// This sort is stable (i.e. does not reorder equal elements) and `O(n log n)` worst-case.
1098
1098
///
@@ -1125,7 +1125,7 @@ impl<T> [T] {
1125
1125
merge_sort ( self , |a, b| compare ( a, b) == Less ) ;
1126
1126
}
1127
1127
1128
- /// Sorts the slice using `f` to extract a key to compare elements by .
1128
+ /// Sorts the slice with a key extraction function .
1129
1129
///
1130
1130
/// This sort is stable (i.e. does not reorder equal elements) and `O(n log n)` worst-case.
1131
1131
///
@@ -1191,8 +1191,8 @@ impl<T> [T] {
1191
1191
core_slice:: SliceExt :: sort_unstable ( self ) ;
1192
1192
}
1193
1193
1194
- /// Sorts the slice using `compare` to compare elements , but may not preserve the order of
1195
- /// equal elements.
1194
+ /// Sorts the slice with a comparator function , but may not preserve the order of equal
1195
+ /// elements.
1196
1196
///
1197
1197
/// This sort is unstable (i.e. may reorder equal elements), in-place (i.e. does not allocate),
1198
1198
/// and `O(n log n)` worst-case.
@@ -1231,8 +1231,8 @@ impl<T> [T] {
1231
1231
core_slice:: SliceExt :: sort_unstable_by ( self , compare) ;
1232
1232
}
1233
1233
1234
- /// Sorts the slice using `f` to extract a key to compare elements by , but may not preserve the
1235
- /// order of equal elements.
1234
+ /// Sorts the slice with a key extraction function , but may not preserve the order of equal
1235
+ /// elements.
1236
1236
///
1237
1237
/// This sort is unstable (i.e. may reorder equal elements), in-place (i.e. does not allocate),
1238
1238
/// and `O(n log n)` worst-case.
@@ -1313,7 +1313,6 @@ impl<T> [T] {
1313
1313
core_slice:: SliceExt :: copy_from_slice ( self , src)
1314
1314
}
1315
1315
1316
-
1317
1316
/// Copies `self` into a new `Vec`.
1318
1317
///
1319
1318
/// # Examples
0 commit comments