-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce false positives number in rustdoc html diff #44347
Conversation
src/librustdoc/html/render.rs
Outdated
elem.path, s1, s2); | ||
if elem_text.split("\n") | ||
.zip(opposite_elem_text.split("\n")) | ||
.find(|&(a, b)| a.trim() != b.trim()).is_some() { |
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.
small note: .find(...).is_some()
is the same as .any(...)
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.
Ah good point!
What false positives does this avoid that rust/src/librustdoc/html/render.rs Lines 1760 to 1770 in 2f1ef9e
EDIT: actually I noticed that this just reduces the output a bit for already found differences, so it would be good to see some before and afters. |
@ollie27: Yes, it works on already found differences (like almost all upcoming rustdoc PRs will most likely). |
824561b
to
7ef2035
Compare
oh hey, |
Damn! |
7ef2035
to
502e707
Compare
I'm not entirely sure which specific entries this will help, but if you say it helps, i'm willing to land this anyway. However, since #44350 changed the signature and layout of |
I think we should merge this one first if you don't mind. The second one will be delayed. |
Yeah, since that other one got delayed, i'll go ahead and push this one forward. @bors r+ |
📌 Commit 502e707 has been approved by |
@bors rollup |
…ve, r=QuietMisdreavus Reduce false positives number in rustdoc html diff cc @rust-lang/dev-tools r? @nrc Very simple trick but should lighten html diff a bit
…ve, r=QuietMisdreavus Reduce false positives number in rustdoc html diff cc @rust-lang/dev-tools r? @nrc Very simple trick but should lighten html diff a bit
…ve, r=QuietMisdreavus Reduce false positives number in rustdoc html diff cc @rust-lang/dev-tools r? @nrc Very simple trick but should lighten html diff a bit
…ve, r=QuietMisdreavus Reduce false positives number in rustdoc html diff cc @rust-lang/dev-tools r? @nrc Very simple trick but should lighten html diff a bit
cc @rust-lang/dev-tools
r? @nrc
Very simple trick but should lighten html diff a bit