fn make_random_string(char_slice: &mut [char], rng: &mut SmallRng) {
    for indx in 0usize .. char_slice.len() {
        let val:u32 = rng.next_u32() % 0x111000u32;
        match char::from_u32(val) {
            Option::Some(ch) => {
                char_slice[indx] = ch;
            }
            Option::None => {
                assert!(!((val > 0xffffu32) && (val <= 0x10ffffu32)));
                char_slice[indx] = char::REPLACEMENT_CHARACTER;
            }
        }
    }
}
// Populate a char slice with random codepoints.
Populate a char slice with random codepoints.
Populate a char slice with random codepoints .
fn make_random_string(char_slice: &mut [char], rng: &mut SmallRng) {
    for indx in 0usize .. char_slice.len() {
        let val:u32 = rng.next_u32() % 0x111000u32;
        match char::from_u32(val) {
            Option::Some(ch) => {
                char_slice[indx] = ch;
            }
            Option::None => {
                assert!(!((val > 0xffffu32) && (val <= 0x10ffffu32)));
                char_slice[indx] = char::REPLACEMENT_CHARACTER;
            }
        }
    }
}
fn make_random_string ( char_slice : & mut [ char ] , rng : & mut SmallRng ) { for indx in 0usize .. char_slice . len ( ) { let val : u32 = rng . next_u32 ( ) % 0x111000u32 ; match char :: from_u32 ( val ) { Option :: Some ( ch ) => { char_slice [ indx ] = ch ; } Option :: None => { assert ! ( ( ( val 0xffffu32 ) ( val 0x10ffffu32 ) ) ) ; char_slice [ indx ] = char :: REPLACEMENT_CHARACTER ; } } } }
Populate a char slice with random codepoints.
Populate a char slice with random codepoints .
char_slice
&mut [char]
rng
&mut SmallRng
char_slice
&mut [char]
rng
&mut SmallRng