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(), let mut hasher = ahash::AHasher::default();
false => { hasher.write(word.as_bytes());
let mut hasher = ahash::AHasher::default(); hasher.finish()
hasher.write(word.as_bytes()); } else {
hasher.finish() rand::rngs::OsRng.next_u64()
}
}; };
UwUSeeder { UwUSeeder {

Loading…
Cancel
Save