mirror of
https://github.com/servo/servo.git
synced 2025-07-19 13:23:46 +01:00
Auto merge of #15069 - heycam:bindgen-regex-update, r=emilio
Update geckolib build-time bindgen build script for recent regex changes. `./mach build-geckolib --with-gecko ...` is broken due to regex's API changing a bit. r? @Manishearth <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15069) <!-- Reviewable:end -->
This commit is contained in:
commit
b4980f9037
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue