fn rerun_if_stdlib_changes(directory: &Path) {
    for entry in std::fs::read_dir(directory).unwrap() {
        let path = entry.unwrap().path();

        if path.is_dir() {
            rerun_if_stdlib_changes(&path);
        } else {
            // Tell Cargo that if the given file changes, to rerun this build script.
            println!("cargo:rerun-if-changed={}", path.to_string_lossy());
        }
    }
}
/// Expects that the given directory is an existing path
Expects that the given directory is an existing path
Expects that the given directory is an existing path
fn rerun_if_stdlib_changes(directory: &Path) {
    for entry in std::fs::read_dir(directory).unwrap() {
        let path = entry.unwrap().path();
        if path.is_dir() {
            rerun_if_stdlib_changes(&path);
        } else {
            // Tell Cargo that if the given file changes, to rerun this build script.
            println!("cargo:rerun-if-changed={}", path.to_string_lossy());
        }
    }
}
fn rerun_if_stdlib_changes ( directory : & Path ) { for entry in std :: fs :: read_dir ( directory ) . unwrap ( ) { let path = entry . unwrap ( ) . path ( ) ; if path . is_dir ( ) { rerun_if_stdlib_changes ( & path ) ; } else { // Tell Cargo that if the given file changes, to rerun this build script. println ! ( " " path to_string_lossy ( ) ) ; } } }
Expects that the given directory is an existing path
Expects that the given directory is an existing path
directory
&Path
directory
&Path