@@ -1175,9 +1175,10 @@ impl<T> [T] {
1175
1175
1176
1176
/// Binary searches this sorted slice for a given element.
1177
1177
///
1178
- /// If the value is found then `Ok` is returned, containing the
1179
- /// index of the matching element; if the value is not found then
1180
- /// `Err` is returned, containing the index where a matching
1178
+ /// If the value is found then [`Result::Ok`] is returned, containing the
1179
+ /// index of the matching element. If there are multiple matches, then any
1180
+ /// one of the matches could be returned. If the value is not found then
1181
+ /// [`Result::Err`] is returned, containing the index where a matching
1181
1182
/// element could be inserted while maintaining sorted order.
1182
1183
///
1183
1184
/// # Examples
@@ -1209,9 +1210,10 @@ impl<T> [T] {
1209
1210
/// order code that indicates whether its argument is `Less`,
1210
1211
/// `Equal` or `Greater` the desired target.
1211
1212
///
1212
- /// If a matching value is found then returns `Ok`, containing
1213
- /// the index for the matched element; if no match is found then
1214
- /// `Err` is returned, containing the index where a matching
1213
+ /// If the value is found then [`Result::Ok`] is returned, containing the
1214
+ /// index of the matching element. If there are multiple matches, then any
1215
+ /// one of the matches could be returned. If the value is not found then
1216
+ /// [`Result::Err`] is returned, containing the index where a matching
1215
1217
/// element could be inserted while maintaining sorted order.
1216
1218
///
1217
1219
/// # Examples
@@ -1265,10 +1267,11 @@ impl<T> [T] {
1265
1267
/// Assumes that the slice is sorted by the key, for instance with
1266
1268
/// [`sort_by_key`] using the same key extraction function.
1267
1269
///
1268
- /// If a matching value is found then returns `Ok`, containing the
1269
- /// index for the matched element; if no match is found then `Err`
1270
- /// is returned, containing the index where a matching element could
1271
- /// be inserted while maintaining sorted order.
1270
+ /// If the value is found then [`Result::Ok`] is returned, containing the
1271
+ /// index of the matching element. If there are multiple matches, then any
1272
+ /// one of the matches could be returned. If the value is not found then
1273
+ /// [`Result::Err`] is returned, containing the index where a matching
1274
+ /// element could be inserted while maintaining sorted order.
1272
1275
///
1273
1276
/// [`sort_by_key`]: #method.sort_by_key
1274
1277
///
0 commit comments