nextsync-rust/tests/utils/utils.rs
2024-03-10 16:49:21 +01:00

12 lines
279 B
Rust

use rand::{distributions::Alphanumeric, Rng};
pub fn get_random_test_id() -> String {
let mut id: String = rand::thread_rng()
.sample_iter(&Alphanumeric)
.take(7)
.map(char::from)
.collect();
id.push_str("_nextsync");
id.to_owned()
}