chore: clippy
This commit is contained in:
parent
a1870b6013
commit
c8bd6705cf
36 changed files with 467 additions and 462 deletions
|
|
@ -11,7 +11,7 @@ pub struct Rand(StdRng);
|
|||
|
||||
impl Rand {
|
||||
pub fn new(seed: usize) -> Self {
|
||||
Rand(StdRng::seed_from_u64(seed as u64))
|
||||
Self(StdRng::seed_from_u64(seed as u64))
|
||||
}
|
||||
|
||||
pub fn unsigned(&mut self, max: usize) -> usize {
|
||||
|
|
@ -24,9 +24,9 @@ impl Rand {
|
|||
for i in 0..word_count {
|
||||
if i > 0 {
|
||||
if self.unsigned(5) == 0 {
|
||||
result.push('\n' as u8);
|
||||
result.push(b'\n');
|
||||
} else {
|
||||
result.push(' ' as u8);
|
||||
result.push(b' ');
|
||||
}
|
||||
}
|
||||
if self.unsigned(3) == 0 {
|
||||
|
|
@ -34,7 +34,7 @@ impl Rand {
|
|||
result.push(OPERATORS[index] as u8);
|
||||
} else {
|
||||
for _ in 0..self.unsigned(8) {
|
||||
result.push(self.0.sample(Alphanumeric) as u8);
|
||||
result.push(self.0.sample(Alphanumeric));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue