In some toy code I have to solve project euler exercises, I write some
Generator that could be used as
Iterator to lazyly create a sequence of prime numbers.
Its implementation is probably not perfect, as well as the rest of the code
This code used to work when I wrote it ~9 months ago. But it doesn with the current nightly.
I'm unable to update this code by myself, probably caused by not really understanding
The version that currently does not work is available at GitLab.
Can someone help me converting that code to a version that works with current nightlies?
I tried by randomly wrapping into
Pin, but that didn't work and the error message basically was the same (or variations thereof):
error[E0599]: no method named `resume` found for type `std::pin::Pin<std::boxed::Box<(dyn std::ops::Generator<Return = (), Yield = u64> + std::marker::Unpin + 'static)>>` in the current scope
While from looking at the
Generator docs it looks like it should be implemented…