mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Report missing include filename in ServoBindings.toml.
Differential Revision: https://phabricator.services.mozilla.com/D48625
This commit is contained in:
parent
84f13342f6
commit
972e89fd41
1 changed files with 4 additions and 1 deletions
|
@ -109,7 +109,10 @@ fn add_headers_recursively(path: PathBuf, added_paths: &mut HashSet<PathBuf>) {
|
||||||
|
|
||||||
fn add_include(name: &str) -> String {
|
fn add_include(name: &str) -> String {
|
||||||
let mut added_paths = ADDED_PATHS.lock().unwrap();
|
let mut added_paths = ADDED_PATHS.lock().unwrap();
|
||||||
let file = search_include(name).expect("Include not found!");
|
let file = match search_include(name) {
|
||||||
|
Some(file) => file,
|
||||||
|
None => panic!("Include not found: {}", name),
|
||||||
|
};
|
||||||
let result = String::from(file.to_str().unwrap());
|
let result = String::from(file.to_str().unwrap());
|
||||||
add_headers_recursively(file, &mut *added_paths);
|
add_headers_recursively(file, &mut *added_paths);
|
||||||
result
|
result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue