Skip to content

Commit e225af1

Browse files
author
Henrik Snöman
committed
Fix for clippy
1 parent 628598c commit e225af1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/rng.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,9 @@ impl<MODE> core::iter::Iterator for Rng<MODE> {
296296

297297
fn next(&mut self) -> Option<Self::Item> {
298298
loop {
299-
match self.value() {
300-
Ok(x) => return Some(x),
301-
// We recover automatically from a seed error, so try again
302-
Err(SeedError) => (),
299+
// We recover automatically from a seed error, so try again
300+
if let Ok(x) = self.value() {
301+
return Some(x);
303302
}
304303
}
305304
}

0 commit comments

Comments
 (0)