author | unc0rr |
Sun, 14 Oct 2018 18:23:19 +0200 | |
changeset 13909 | 3f0576157749 |
parent 13908 | e26573441808 |
child 13910 | fed924791e06 |
--- a/rust/lfprng/src/lib.rs Sun Oct 14 18:01:58 2018 +0200 +++ b/rust/lfprng/src/lib.rs Sun Oct 14 18:23:19 2018 +0200 @@ -46,6 +46,15 @@ } } +impl Iterator for LaggedFibonacciPRNG { + type Item = u32; + + fn next(&mut self) -> Option<u32> { + self.get_next(); + Some(self.get_next()) + } +} + #[cfg(test)] #[test] fn compatibility() {