-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
ideaAn idea, open to discussion.An idea, open to discussion.priority:lowLow priority issue.Low priority issue.
Description
Currently example 1b has the following actor.
async fn greeter_actor(_: Context<!>) -> Result<(), !> {
println!("Hello World");
Ok(())
}I would like to following to be possible
async fn greeter_actor(_: Context<!>) { // Returns `()`.
println!("Hello World");
}The following implementation doesn't work as it overlaps with our implementation for Future<Output = Result(), E>.
impl<Fut> Actor for Fut
where Fut: Future<Output = ()>
{
type Error = !;
fn try_poll(self: Pin<&mut Self>, waker: &LocalWaker) -> Poll<Result<(), Self::Error>> {
self.poll(waker).map(Ok)
}
}This requires rust-lang/rfcs#1672.
Metadata
Metadata
Assignees
Labels
ideaAn idea, open to discussion.An idea, open to discussion.priority:lowLow priority issue.Low priority issue.