mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add asserts to make failure clearer
This commit is contained in:
parent
8553588666
commit
ac5c09c929
1 changed files with 7 additions and 1 deletions
|
@ -42,7 +42,13 @@ mod bindings {
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref INCLUDE_RE: Regex = Regex::new(r#"#include\s*"(.+?)""#).unwrap();
|
static ref INCLUDE_RE: Regex = Regex::new(r#"#include\s*"(.+?)""#).unwrap();
|
||||||
static ref DISTDIR_PATH: PathBuf = PathBuf::from(env::var("MOZ_DIST").unwrap());
|
static ref DISTDIR_PATH: PathBuf = {
|
||||||
|
let path = PathBuf::from(env::var("MOZ_DIST").unwrap());
|
||||||
|
if !path.is_absolute() || !path.is_dir() {
|
||||||
|
panic!("MOZ_DIST must be an absolute directory, was: {}", path.display());
|
||||||
|
}
|
||||||
|
path
|
||||||
|
};
|
||||||
static ref SEARCH_PATHS: Vec<PathBuf> = vec![
|
static ref SEARCH_PATHS: Vec<PathBuf> = vec![
|
||||||
DISTDIR_PATH.join("include"),
|
DISTDIR_PATH.join("include"),
|
||||||
DISTDIR_PATH.join("include/nspr"),
|
DISTDIR_PATH.join("include/nspr"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue