pub fn check(path: &Path, bad: &mut bool) {
    // Check licences
    let path = path.join("vendor");
    assert!(path.exists(), "vendor directory missing");
    let mut saw_dir = false;
    for dir in t!(path.read_dir()) {
        saw_dir = true;
        let dir = t!(dir);

        // skip our exceptions
        if EXCEPTIONS.iter().any(|exception| {
            dir.path()
                .to_str()
                .unwrap()
                .contains(&format!("src/vendor/{}", exception))
        }) {
            continue;
        }

        let toml = dir.path().join("Cargo.toml");
        *bad = *bad || !check_license(&toml);
    }
    assert!(saw_dir, "no vendored source");
}
/// Checks the dependency at the given path. Changes `bad` to `true` if a check failed.
///
/// Specifically, this checks that the license is correct.
Checks the dependency at the given path. Changes `bad` to `true` if a check failed.
Specifically, this checks that the license is correct.
Checks the dependency at the given path . Changes ` bad ` to ` true ` if a check failed . Specifically this checks that the license is correct .
pub fn check(path: &Path, bad: &mut bool) {
    // Check licences
    let path = path.join("vendor");
    assert!(path.exists(), "vendor directory missing");
    let mut saw_dir = false;
    for dir in t!(path.read_dir()) {
        saw_dir = true;
        let dir = t!(dir);
        // skip our exceptions
        if EXCEPTIONS.iter().any(|exception| {
            dir.path()
                .to_str()
                .unwrap()
                .contains(&format!("src/vendor/{}", exception))
        }) {
            continue;
        }
        let toml = dir.path().join("Cargo.toml");
        *bad = *bad || !check_license(&toml);
    }
    assert!(saw_dir, "no vendored source");
}
pub fn check ( path : & Path , bad : & mut bool ) { // Check licences let path = path . join ( " " ) ; assert ! ( path exists ( ) " " ) ; let mut saw_dir = false ; for dir in t ! ( path read_dir ( ) ) { saw_dir = true ; let dir = t ! ( dir ) ; // skip our exceptions if EXCEPTIONS . iter ( ) . any ( | exception | { dir . path ( ) . to_str ( ) . unwrap ( ) . contains ( & format ! ( " " exception ) ) } ) { continue ; } let toml = dir . path ( ) . join ( " " ) ; * bad = * bad || ! check_license ( & toml ) ; } assert ! ( saw_dir " " ) ; }
Checks the dependency at the given path.
Checks the dependency at the given path .
path
&Path
bad
&mut bool
path
&Path
bad
&mut bool