Skip to content

Commit 57b83d1

Browse files
author
Henrik Snöman
committed
Changed iterator to work with result instead
1 parent af2cbe4 commit 57b83d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rng.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ impl<MODE> Rng<MODE> {
278278
}
279279

280280
impl<MODE> core::iter::Iterator for Rng<MODE> {
281-
type Item = u32;
281+
type Item = Result<u32, Error>;
282282

283-
fn next(&mut self) -> Option<u32> {
284-
self.value().ok()
283+
fn next(&mut self) -> Option<Self::Item> {
284+
Some(self.value())
285285
}
286286
}
287287

0 commit comments

Comments
 (0)