

rustdoc-search: simplify `checkPath` and `sortResults` by notriddle · Pull Reque...
source link: https://github.com/rust-lang/rust/pull/118109
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Conversation
Contributor
These two commits reduce the amount of code in search.js with no noticeable change in performance.
https://notriddle.com/rustdoc-html-demo-5/profile-5/index.html
Collaborator
r? @jsha (rustbot has picked a reviewer for you, use r? to override) |
added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
labels
Collaborator
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @jsha |
@@ -18,6 +18,8 @@ if (!Array.prototype.toSpliced) { | ||
// This mapping table should match the discriminants of |
||
// `rustdoc::formats::item_type::ItemType` type in Rust. |
||
const itemTypes = [ |
||
"keyword", |
Took me a little while to understand why you moved these two at the start. Could you add a comment mentioning that they need to be first to be sure they are considered first (for precedence) please? Either here or in item_type.rs
, as you see fit best.
Contributor
Author
That makes sense.
Contributor
Author
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thanks! @bors r+ rollup |
added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
labels
Contributor
☔ The latest upstream changes (presumably #118134) made this pull request unmergeable. Please resolve the merge conflicts. |
added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
This comment has been minimized.
Contributor
Author
@bors r=GuillaumeGomez Rebased. |
added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Successfully merging this pull request may close these issues.
None yet
Recommend
-
12
Conversation Copy link Contributor ...
-
8
Copy link Contributor notriddle commented
-
13
Copy link Contributor notriddle commented
-
8
Copy link Contributor notriddle
-
6
Conversation Contributor...
-
14
Conversation Contributor Fixes...
-
5
Conversation Contributor This f...
-
4
Conversation Contributor Previe...
-
3
Contributor Blocked on
-
3
Summary Trait associated type queries work in rustdoc's type driven search. The data is included in the search-index.js file, and the queries are designed to "do what I mean" when users type them in, so, for e...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK