If statemwent optimization

pull/2/head
Isaac Mills 3 years ago
parent 6f0bdf9d96
commit 2ad28b49ac
No known key found for this signature in database
GPG Key ID: B67D7410F33A0F61

File diff suppressed because it is too large Load Diff

@ -14,13 +14,12 @@ pub struct UwUSeeder {
impl UwUSeeder { impl UwUSeeder {
#[inline] #[inline]
pub fn new(word: &str, random: bool) -> UwUSeeder { pub fn new(word: &str, random: bool) -> UwUSeeder {
let entropy = match random { let entropy = if !random {
true => rand::rngs::OsRng.next_u64(),
false => {
let mut hasher = ahash::AHasher::default(); let mut hasher = ahash::AHasher::default();
hasher.write(word.as_bytes()); hasher.write(word.as_bytes());
hasher.finish() hasher.finish()
} } else {
rand::rngs::OsRng.next_u64()
}; };
UwUSeeder { UwUSeeder {

Loading…
Cancel
Save