antholeole/actix-sockets

no method named `then` found for struct `actix::fut::future::FutureWrap` in the current scope

Closed this issue · 2 comments

no method named then found for struct actix::fut::future::FutureWrap in the current scope

method not found in actix::fut::future::FutureWrap<actix::address::message::MsgRequest<actix::dev::channel::AddressSender<lobby::Lobby>, messages::Connect>, ws::WsConn>

help: items from traits can only be used if the trait is in scoperustc(E0599)
ws.rs(46, 14): method not found in actix::fut::future::FutureWrap<actix::address::message::MsgRequest<actix::dev::channel::AddressSender<lobby::Lobby>, messages::Connect>, ws::WsConn>
mod.rs(142, 8): the method is available for actix::fut::future::FutureWrap<actix::address::message::MsgRequest<actix::dev::channel::AddressSender<lobby::Lobby>, messages::Connect>, ws::WsConn> here

`
fn started(&mut self, ctx: &mut Self::Context) {
self.hb(ctx);
let addr = ctx.address();

    self.lobby_addr
        .send(Connect {
            addr: addr.recipient(),
            lobby_id: self.room,
            self_id: self.id,
        })
        .into_actor(self)
        .then(|res, _, ctx| {
            match res {
                Ok(_res) => (),
                _ => ctx.stop(),
            }
            fut::ready(())
        })
        .wait(ctx);
}

`

Sorry this one slipped through the cracks. What were you doing when this error appeared? I don't have this problem nor does anyone else (to my knowledge). Perhaps you missed an import? Copy paste the whole file, I will take a look!

I'm closing this for now but feel free to reopen. Not sure how I missed this one, sorry about that.