mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 21:26:50 +00:00
1 parent
1a09eb0f02
commit
d82ea331cf
2 files changed
+7
-2
No files matched your search
@@ -4,7 +4,12 @@ use std::{
|
||||
};
|
||||
|
||||
use arrayvec::ArrayString;
|
||||
use rand::{thread_rng, Rng};
|
||||
use rand::{seq::SliceRandom, thread_rng, Rng};
|
||||
|
||||
pub fn shuffle<T>(vec: &mut [T]) {
|
||||
let mut rng = thread_rng();
|
||||
vec.shuffle(&mut rng);
|
||||
}
|
||||
|
||||
pub fn string(length: usize) -> String {
|
||||
thread_rng()
|
||||
|
||||
Reference in new issue
Block a user