fn validate_included(dir: &Dir<'_>, path: &Path, root: &Path) {
    for entry in path.read_dir().unwrap() {
        let entry = entry.unwrap().path();
        let entry = entry.strip_prefix(root).unwrap();

        let name = entry.file_name().unwrap();

        assert!(dir.contains(entry), "Can't find {}", entry.display());

        if entry.is_dir() {
            let child_path = path.join(name);
            validate_included(
                dir.get_entry(entry).unwrap().as_dir().unwrap(),
                &child_path,
                root,
            );
        }
    }
}
// Validates that all files on the filesystem exist in the inclusion
Validates that all files on the filesystem exist in the inclusion
Validates that all files on the filesystem exist in the inclusion
fn validate_included(dir: &Dir<'_>, path: &Path, root: &Path) {
    for entry in path.read_dir().unwrap() {
        let entry = entry.unwrap().path();
        let entry = entry.strip_prefix(root).unwrap();
        let name = entry.file_name().unwrap();
        assert!(dir.contains(entry), "Can't find {}", entry.display());
        if entry.is_dir() {
            let child_path = path.join(name);
            validate_included(
                dir.get_entry(entry).unwrap().as_dir().unwrap(),
                &child_path,
                root,
            );
        }
    }
}
fn validate_included ( dir : & Dir < ' _ > , path : & Path , root : & Path ) { for entry in path . read_dir ( ) . unwrap ( ) { let entry = entry . unwrap ( ) . path ( ) ; let entry = entry . strip_prefix ( root ) . unwrap ( ) ; let name = entry . file_name ( ) . unwrap ( ) ; assert ! ( dir contains ( entry ) " " entry display ( ) ) ; if entry . is_dir ( ) { let child_path = path . join ( name ) ; validate_included ( dir . get_entry ( entry ) . unwrap ( ) . as_dir ( ) . unwrap ( ) , & child_path , root , ) ; } } }
Validates that all files on the filesystem exist in the inclusion
Validates that all files on the filesystem exist in the inclusion
dir
&Dir<'_>
path
&Path
root
&Path
dir
&Dir<'_>
path
&Path
root
&Path