From 84613e66a286536dff9828d8aca2625d2c6c6bf2 Mon Sep 17 00:00:00 2001 From: Jill Date: Mon, 7 Feb 2022 17:00:03 +0100 Subject: garage(tests): Remove RNG stuff --- src/garage/tests/common/util.rs | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 src/garage/tests/common/util.rs (limited to 'src/garage/tests/common/util.rs') diff --git a/src/garage/tests/common/util.rs b/src/garage/tests/common/util.rs deleted file mode 100644 index 49c72879..00000000 --- a/src/garage/tests/common/util.rs +++ /dev/null @@ -1,13 +0,0 @@ -pub fn random_id(len: usize) -> String { - use rand::distributions::Slice; - use rand::Rng; - - static ALPHABET: &[u8] = b"abcdefghijklmnopqrstuvwxyz0123456789."; - - let rng = rand::thread_rng(); - rng.sample_iter(Slice::new(ALPHABET).unwrap()) - .map(|b| char::from(*b)) - .filter(|c| c.is_ascii_lowercase() || c.is_ascii_digit()) - .take(len) - .collect() -} -- cgit v1.2.3