forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustdoc: Better sorting criteria for searching.
This essentially rewrites the sorting algorithm, which relied on the implementation-defined handling of non-consistent sorting function (cf. ECMA-262 5th edition, section 15.4.4.11) and was also a bit inefficient. The new criteria expands the prior criteria while adding these ones: - The current crate is always preferred over other crates. (Closes rust-lang#13178) - An item with a description is preferred over one without it, if item names match. This is a heuristic assuming that the documented item is more likely to be relevant. - An item with no literal occurrence of search query is handled correctly.
- Loading branch information
1 parent
2f41a85
commit db3d6d6
Showing
1 changed file
with
52 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db3d6d6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+, awesome!