-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
(Yay, this seems to be the first issue :) )
I noticed a small issue with the latest version of async-wormhole. When you do not define a pre_post_poll handler for async wormhole it will throw an error like this one:
error[E0698]: type inside `async fn` body must be known in this context
--> lib/api/src/instance.rs:190:20
|
190 | let task = async_wormhole::AsyncWormhole::new(stack, |yielder| -> Result<Box<[crate::Val]>, RuntimeError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for type parameter `P`
|
note: the type is part of the `async fn` body because of this `await`
The easiest way to fix this is to just set an empty lambda function like so, but that's a little ugly.
task.set_pre_post_poll(|| {});
Maybe we can hide function this method feature flag or require the handler to always be set? I think the error might be super confusing for some users.
Metadata
Metadata
Assignees
Labels
No labels