Commit d6f2740
authored
Rollup merge of #106985 - jofas:106746-fix, r=ChrisDenton
Enhanced doucmentation of binary search methods for `slice` and `VecDeque` for unsorted instances
Fixes #106746. Issue #106746 raises the concern that the binary search methods for slices and deques aren't explicit enough about the fact that they are only applicable to sorted slices/deques. I changed the explanation for these methods. I took the relatively harsh description of the behaviour of binary search on unsorted collections ("unspecified and meaningless") from the description of the [`partition_point`](https://doc.rust-lang.org/std/primitive.slice.html#method.partition_point) method:
> If this slice is not partitioned, the returned result is unspecified and meaningless, as this method performs a kind of binary search.2 files changed
+20
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2394 | 2394 | | |
2395 | 2395 | | |
2396 | 2396 | | |
2397 | | - | |
| 2397 | + | |
| 2398 | + | |
2398 | 2399 | | |
2399 | 2400 | | |
2400 | 2401 | | |
| |||
2404 | 2405 | | |
2405 | 2406 | | |
2406 | 2407 | | |
2407 | | - | |
2408 | 2408 | | |
2409 | 2409 | | |
2410 | 2410 | | |
| |||
2450 | 2450 | | |
2451 | 2451 | | |
2452 | 2452 | | |
2453 | | - | |
2454 | 2453 | | |
2455 | | - | |
2456 | | - | |
2457 | | - | |
2458 | | - | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
2459 | 2460 | | |
2460 | 2461 | | |
2461 | 2462 | | |
| |||
2465 | 2466 | | |
2466 | 2467 | | |
2467 | 2468 | | |
2468 | | - | |
2469 | 2469 | | |
2470 | 2470 | | |
2471 | 2471 | | |
| |||
2505 | 2505 | | |
2506 | 2506 | | |
2507 | 2507 | | |
2508 | | - | |
2509 | 2508 | | |
2510 | 2509 | | |
2511 | 2510 | | |
| 2511 | + | |
| 2512 | + | |
2512 | 2513 | | |
2513 | 2514 | | |
2514 | 2515 | | |
| |||
2518 | 2519 | | |
2519 | 2520 | | |
2520 | 2521 | | |
2521 | | - | |
2522 | 2522 | | |
2523 | 2523 | | |
2524 | 2524 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2387 | 2387 | | |
2388 | 2388 | | |
2389 | 2389 | | |
2390 | | - | |
| 2390 | + | |
| 2391 | + | |
2391 | 2392 | | |
2392 | 2393 | | |
2393 | 2394 | | |
| |||
2399 | 2400 | | |
2400 | 2401 | | |
2401 | 2402 | | |
2402 | | - | |
2403 | 2403 | | |
2404 | 2404 | | |
2405 | 2405 | | |
| |||
2462 | 2462 | | |
2463 | 2463 | | |
2464 | 2464 | | |
2465 | | - | |
2466 | 2465 | | |
2467 | | - | |
2468 | | - | |
2469 | | - | |
2470 | | - | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
2471 | 2472 | | |
2472 | 2473 | | |
2473 | 2474 | | |
| |||
2479 | 2480 | | |
2480 | 2481 | | |
2481 | 2482 | | |
2482 | | - | |
2483 | 2483 | | |
2484 | 2484 | | |
2485 | 2485 | | |
| |||
2548 | 2548 | | |
2549 | 2549 | | |
2550 | 2550 | | |
2551 | | - | |
2552 | 2551 | | |
2553 | 2552 | | |
2554 | 2553 | | |
| 2554 | + | |
| 2555 | + | |
2555 | 2556 | | |
2556 | 2557 | | |
2557 | 2558 | | |
| |||
2563 | 2564 | | |
2564 | 2565 | | |
2565 | 2566 | | |
2566 | | - | |
2567 | 2567 | | |
2568 | 2568 | | |
2569 | 2569 | | |
| |||
0 commit comments