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 {
#[inline]
pub fn new(word: &str, random: bool) -> UwUSeeder {
let entropy = match random {
true => rand::rngs::OsRng.next_u64(),
false => {
let mut hasher = ahash::AHasher::default();
hasher.write(word.as_bytes());
hasher.finish()
}
let entropy = if !random {
let mut hasher = ahash::AHasher::default();
hasher.write(word.as_bytes());
hasher.finish()
} else {
rand::rngs::OsRng.next_u64()
};
UwUSeeder {

Loading…
Cancel
Save