mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 22:53:28 +00:00
Rollup merge of #44347 - GuillaumeGomez:rustdoc-false-positive, 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
This commit is contained in:
commit
65fd1a20b0
@ -668,9 +668,13 @@ fn render_difference(diff: &html_diff::Difference) {
|
||||
elem.path, elem.element_name, elem_attributes, opposite_elem_attributes);
|
||||
}
|
||||
html_diff::Difference::NodeText { ref elem, ref elem_text, ref opposite_elem_text, .. } => {
|
||||
let (s1, s2) = concise_compared_strs(elem_text, opposite_elem_text);
|
||||
println!(" {} Text differs:\n expected: `{}`\n found: `{}`",
|
||||
elem.path, s1, s2);
|
||||
if elem_text.split("\n")
|
||||
.zip(opposite_elem_text.split("\n"))
|
||||
.any(|(a, b)| a.trim() != b.trim()) {
|
||||
let (s1, s2) = concise_compared_strs(elem_text, opposite_elem_text);
|
||||
println!(" {} Text differs:\n expected: `{}`\n found: `{}`",
|
||||
elem.path, s1, s2);
|
||||
}
|
||||
}
|
||||
html_diff::Difference::NotPresent { ref elem, ref opposite_elem } => {
|
||||
if let Some(ref elem) = *elem {
|
||||
|
Loading…
Reference in New Issue
Block a user