notgull/is-prime

Remove Rick Roll

Closed this issue · 0 comments

I'm not sure why a YouTube video is involved, and I'm getting a build error:

error: future cannot be sent between threads safely
   --> /home/rajas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/is-prime2-0.1.0/src/lib.rs:52:14
    |
52  |             .spawn(async move {
    |              ^^^^^ future created by async block is not `Send`
    |
    = help: within `{async block@/home/rajas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/is-prime2-0.1.0/src/lib.rs:52:20: 65:14}`, the trait `std::marker::Send` is not implemented for `*mut ()`
note: future is not `Send` as this value is used across an await
   --> /home/rajas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/is-prime2-0.1.0/src/lib.rs:61:26
    |
57  |                 let _e = rt.enter();
    |                     -- has type `EnterGuard<'_>` which is not `Send`
...
61  |                         .await
    |                          ^^^^^ await occurs here, with `_e` maybe used later
note: required by a bound in `Executor::<'a>::spawn`
   --> /home/rajas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-executor-1.8.0/src/lib.rs:150:73
    |
150 |     pub fn spawn<T: Send + 'a>(&self, future: impl Future<Output = T> + Send + 'a) -> Task<T> {
    |                                                                         ^^^^ required by this bound in `Executor::<'a>::spawn`