Skip to content

Commit

Permalink
Update geckolib build-time bindgen build script for recent regex chan…
Browse files Browse the repository at this point in the history
…ges.
  • Loading branch information
heycam committed Jan 17, 2017
1 parent 363f590 commit d4023a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/style/build_gecko.rs
Expand Up @@ -91,7 +91,7 @@ mod bindings {
added_paths.insert(path);
// Find all includes and add them recursively
for cap in INCLUDE_RE.captures_iter(&content) {
if let Some(path) = search_include(cap.at(1).unwrap()) {
if let Some(path) = search_include(cap.get(1).unwrap().as_str()) {
add_headers_recursively(path, added_paths);
}
}
Expand Down Expand Up @@ -212,7 +212,8 @@ mod bindings {
}
let mut result = builder.generate().expect("Unable to generate bindings").to_string();
for fixup in fixups.iter() {
result = Regex::new(&format!(r"\b{}\b", fixup.pat)).unwrap().replace_all(&result, fixup.rep.as_str());
result = Regex::new(&format!(r"\b{}\b", fixup.pat)).unwrap().replace_all(&result, fixup.rep.as_str())
.into_owned().into();
}
File::create(&out_file).unwrap().write_all(&result.into_bytes()).expect("Unable to write output");
}
Expand Down

0 comments on commit d4023a3

Please sign in to comment.