fn random_file() -> NamedTempFile {
        let size: usize = 100 * 1024 + rand::random::<usize>() % (50 * 1024);
        let mut buf: Vec<u8> = vec![0; size];

        OsRng.fill_bytes(&mut buf);

        let mut f = NamedTempFile::new().unwrap();
        f.write_all(&buf).unwrap();

        f
    }
// generate a file with random content, size 100kb..150kb
generate a file with random content, size 100kb..150kb
generate a file with random content size 100kb .. 150kb
fn random_file() -> NamedTempFile {
        let size: usize = 100 * 1024 + rand::random::<usize>() % (50 * 1024);
        let mut buf: Vec<u8> = vec![0; size];
        OsRng.fill_bytes(&mut buf);
        let mut f = NamedTempFile::new().unwrap();
        f.write_all(&buf).unwrap();
        f
    }
fn random_file ( ) -> NamedTempFile { let size : usize = 100 * 1024 + rand :: random :: < usize > ( ) % ( 50 * 1024 ) ; let mut buf : Vec < u8 > = vec ! [ 0 size ] ; OsRng . fill_bytes ( & mut buf ) ; let mut f = NamedTempFile :: new ( ) . unwrap ( ) ; f . write_all ( & buf ) . unwrap ( ) ; f }
generate a file with random content, size 100kb..150kb
generate a file with random content size 100kb .. 150kb