-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
#[async_handler]
impl Handler<Msg> for MyActor {
type Result = usize;
async fn handle(&mut self, _msg: Msg, ctx: &mut Context<Self>) -> Self::Result {
dbg!(&ctx);
self.0 = 30;
sleep(Duration::from_secs(3)).await;
self.0 -= 1;
self.0
}
}This raises this warning while ctx is actually used.
warning: unused variable: `ctx`
--> examples/hello.rs:22:43
|
22 | async fn handle(&mut self, _msg: Msg, ctx: &mut Context<Self>) -> Self::Result {
| ^^^ help: if this is intentional, prefix it with an underscore: `_ctx`
|
= note: `#[warn(unused_variables)]` on by default
Metadata
Metadata
Assignees
Labels
No labels