fn gen_rand_map(set_size: usize, key_size: usize) -> (LoanMap<String, String>, Vec<String>) {
        let map: LoanMap<String, String> = LoanMap::with_capacity(16384, 16);
        let mut rng = rand::thread_rng();

        let keys: Vec<String> = (0..set_size)
            .map(|_| {
                iter::repeat(())
                    .map(|()| rng.sample(Alphanumeric))
                    .take(key_size)
                    .collect::<String>()
            })
            .collect();

        for key in &keys {
            map.put(
                key.clone(),
                iter::repeat(())
                    .map(|()| rng.sample(Alphanumeric))
                    .take(1024)
                    .collect::<String>(),
            );
        }

        (map, keys)
    }
/// Generates a random map with `set_size` elements and keys of size `key_size`
Generates a random map with `set_size` elements and keys of size `key_size`
Generates a random map with ` set_size ` elements and keys of size ` key_size `
fn gen_rand_map(set_size: usize, key_size: usize) -> (LoanMap<String, String>, Vec<String>) {
        let map: LoanMap<String, String> = LoanMap::with_capacity(16384, 16);
        let mut rng = rand::thread_rng();
        let keys: Vec<String> = (0..set_size)
            .map(|_| {
                iter::repeat(())
                    .map(|()| rng.sample(Alphanumeric))
                    .take(key_size)
                    .collect::<String>()
            })
            .collect();
        for key in &keys {
            map.put(
                key.clone(),
                iter::repeat(())
                    .map(|()| rng.sample(Alphanumeric))
                    .take(1024)
                    .collect::<String>(),
            );
        }
        (map, keys)
    }
fn gen_rand_map ( set_size : usize , key_size : usize ) -> ( LoanMap < String , String > , Vec < String > ) { let map : LoanMap < String , String > = LoanMap :: with_capacity ( 16384 , 16 ) ; let mut rng = rand :: thread_rng ( ) ; let keys : Vec < String > = ( 0 .. set_size ) . map ( | _ | { iter :: repeat ( ( ) ) . map ( | ( ) | rng . sample ( Alphanumeric ) ) . take ( key_size ) . collect :: < String > ( ) } ) . collect ( ) ; for key in & keys { map . put ( key . clone ( ) , iter :: repeat ( ( ) ) . map ( | ( ) | rng . sample ( Alphanumeric ) ) . take ( 1024 ) . collect :: < String > ( ) , ) ; } ( map , keys ) }
Generates a random map with `set_size` elements and keys of size `key_size`
Generates a random map with ` set_size ` elements and keys of size ` key_size `
set_size
usize
key_size
usize
set_size
usize
key_size
usize