Remove some false positive issues

This commit is contained in:
Guillaume Gomez 2017-08-27 12:40:56 +02:00
parent bba7fd9dd5
commit 9b26f3ad25
5 changed files with 24 additions and 1081 deletions

1089
src/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@ fn main() {
// Locate the actual compiler that we're invoking
env::remove_var("CC");
env::remove_var("CXX");
let mut cfg = gcc::Build::new();
let mut cfg = gcc::Config::new();
cfg.cargo_metadata(false)
.out_dir("/")
.target(&target)

View File

@ -19,7 +19,7 @@ use std::path::Path;
fn main() {
let target = env::var("TARGET").expect("TARGET was not set");
let cfg = &mut gcc::Build::new();
let cfg = &mut gcc::Config::new();
let mut profile_sources = vec!["GCDAProfiling.c",
"InstrProfiling.c",

View File

@ -14,7 +14,7 @@ extern crate gcc;
fn main() {
let src_dir = std::path::Path::new("../rt/hoedown/src");
build_helper::rerun_if_changed_anything_in_dir(src_dir);
let mut cfg = gcc::Build::new();
let mut cfg = gcc::Config::new();
cfg.file("../rt/hoedown/src/autolink.c")
.file("../rt/hoedown/src/buffer.c")
.file("../rt/hoedown/src/document.c")

View File

@ -1659,7 +1659,15 @@ fn get_html_diff(w: &mut fmt::Formatter, md_text: &str, render_type: RenderType,
println!("Differences spotted in {:?}:\n{}",
md_text,
differences.iter()
.map(|s| format!("=> {}", s.to_string()))
.filter_map(|s| {
match *s {
html_diff::Difference::NodeText { ref elem_text,
ref opposite_elem_text,
.. }
if elem_text.trim() == opposite_elem_text.trim() => None,
_ => Some(format!("=> {}", s.to_string())),
}
})
.collect::<Vec<String>>()
.join("\n"));
}