fdf 0.4.1

A fast, multi-threaded filesystem search tool
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![allow(clippy::all)]
#![allow(warnings)]

use std::io::Write;
use std::thread;

fn main() {
    //set threadcounts for rayon.
    const MIN_THREADS: usize = 1;
    let num_threads =
        thread::available_parallelism().map_or(MIN_THREADS, core::num::NonZeroUsize::get);

    if num_threads == MIN_THREADS {
        println!("cargo:rustc-env=CPU_COUNT={MIN_THREADS}");
    } else {
        println!("cargo:rustc-env=CPU_COUNT={num_threads}");
    }
}