about summary refs log tree commit diff
path: root/src/test/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-04-26 01:21:20 +0200
committerGitHub <noreply@github.com>2022-04-26 01:21:20 +0200
commit51b86848ffc4f8fa33a9195ee0b927a12a4ed2a5 (patch)
treed57ee7a6f774e7161e5a77d7231e549ca425ca0b /src/test/rustdoc-js-std/parser-errors.js
parent055bf4ccd521c2c2185166c86951be7be145727c (diff)
parentc18646067734f03354daa0d1c568e97433e4ad49 (diff)
downloadrust-51b86848ffc4f8fa33a9195ee0b927a12a4ed2a5.tar.gz
rust-51b86848ffc4f8fa33a9195ee0b927a12a4ed2a5.zip
Rollup merge of #90312 - r00ster91:search, r=Dylan-DPC
Fix some confusing wording and improve slice-search-related docs

This adds more links between `contains` and `binary_search` because I do think they have some relevant connections. If your (big) slice happens to be sorted and you know it, surely you should be using `[3; 100].binary_search(&5).is_ok()` over `[3; 100].contains(&5)`?
This also fixes the confusing "searches this sorted X" wording which just sounds really weird because it doesn't know whether it's actually sorted. It should be but it may not be. The new wording should make it clearer that you will probably want to sort it and in the same sentence it also mentions the related function `contains`.
Similarly, this mentions `binary_search` on `contains`' docs.
This also fixes some other minor stuff and inconsistencies.
Diffstat (limited to 'src/test/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions