style: Report missing include filename in ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D48625
This commit is contained in:
Cameron McCormack 2019-10-09 10:44:29 +00:00 committed by Emilio Cobos Álvarez
parent 84f13342f6
commit 972e89fd41

View file

@ -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