toolchest 0.1.0

Essential utility collection for Rust - the missing complement to itertools
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use toolchest::{hash, io};

fn main() {
    let s = "hello";
    println!(
        "djb2={} fnv1a={}",
        hash::djb2(s.as_bytes()),
        hash::fnv1a(s.as_bytes())
    );

    let _ = io::ensure_dir("target/tmp");
    let _ = io::write_atomic("target/tmp/example.txt", b"content");
    #[cfg(feature = "fs")]
    {
        let files = io::find_files("target", "example").unwrap();
        println!("found {} files", files.len());
    }
}