Can create user accounts

This commit is contained in:
2022-04-07 18:59:48 +02:00
parent 52888b3af7
commit c9ca23cd82
11 changed files with 144 additions and 12 deletions

View File

@ -1,3 +1,4 @@
pub mod err;
pub mod time;
pub mod network_utils;
pub mod network_utils;
pub mod string_utils;

11
src/utils/string_utils.rs Normal file
View File

@ -0,0 +1,11 @@
use rand::distributions::Alphanumeric;
use rand::Rng;
/// Generate a random string of a given size
pub fn rand_str(len: usize) -> String {
rand::thread_rng()
.sample_iter(&Alphanumeric)
.map(char::from)
.take(len)
.collect()
}