fn walk_dir(dir_path: &Path) -> bool {
    let pool = ThreadPoolBuilder::new()
        .num_threads(num_cpus::get())
        .build()
        .unwrap();
    let mut result = true;

    for entry in WalkDir::new(dir_path).into_iter().filter_map(|e| e.ok()) {
        if entry.file_type().is_file() && is_html_file(&entry) {
            let urls = parse_html_file(entry.path());
            let success = pool.install(|| check_urls(&urls));
            result &= success;
        }
    }

    result
}
/// Traverses a given path recursively, checking all *.html files found.
Traverses a given path recursively, checking all *.html files found.
Traverses a given path recursively checking all * . html files found .
fn walk_dir(dir_path: &Path) -> bool {
    let pool = ThreadPoolBuilder::new()
        .num_threads(num_cpus::get())
        .build()
        .unwrap();
    let mut result = true;
    for entry in WalkDir::new(dir_path).into_iter().filter_map(|e| e.ok()) {
        if entry.file_type().is_file() && is_html_file(&entry) {
            let urls = parse_html_file(entry.path());
            let success = pool.install(|| check_urls(&urls));
            result &= success;
        }
    }
    result
}
fn walk_dir ( dir_path : & Path ) -> bool { let pool = ThreadPoolBuilder :: new ( ) . num_threads ( num_cpus :: get ( ) ) . build ( ) . unwrap ( ) ; let mut result = true ; for entry in WalkDir :: new ( dir_path ) . into_iter ( ) . filter_map ( | e | e . ok ( ) ) { if entry . file_type ( ) . is_file ( ) && is_html_file ( & entry ) { let urls = parse_html_file ( entry . path ( ) ) ; let success = pool . install ( | | check_urls ( & urls ) ) ; result &= success ; } } result }
Traverses a given path recursively, checking all *.html files found.
Traverses a given path recursively checking all * . html files found .
dir_path
&Path
dir_path
&Path