Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
criterion-stats 0.1.1 - Docs.rs
[go: Go Back, main page]

criterion-stats 0.1.1

Criterion's statistics library
Documentation
1
2
3
4
5
6
7
8
9
10
11
use rand::{Rand, Rng, XorShiftRng, self};

pub fn vec<T>(size: usize, start: usize) -> Option<Vec<T>> where T: Rand {
    if size > start + 1 {
        let mut rng: XorShiftRng = rand::thread_rng().gen();

        Some((0..size).map(|_| rng.gen()).collect())
    } else {
        None
    }
}