Skip to content

Commit 53f076f

Browse files
committed
update wit-bindgen and simplify async_borrowing_callee test
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
1 parent e13563e commit 53f076f

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/test-programs/src/bin/async_borrowing_callee.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mod bindings {
77
"local:local/borrowing#foo",
88
"local:local/run-bool#run"
99
]
10-
}
10+
},
1111
});
1212

1313
use super::Component;
@@ -19,23 +19,20 @@ use {
1919
exports::local::local::{borrowing::Guest as Borrowing, run_bool::Guest as RunBool},
2020
local::local::borrowing_types::X,
2121
},
22-
futures::future,
23-
std::future::Future,
2422
wit_bindgen_rt::async_support,
2523
};
2624

2725
struct Component;
2826

2927
impl Borrowing for Component {
30-
fn foo(x: &X, misbehave: bool) -> impl Future<Output = ()> + 'static {
28+
async fn foo(x: &X, misbehave: bool) {
3129
let handle = x.handle();
3230
async_support::spawn(async move {
3331
if misbehave {
3432
unsafe { X::from_handle(handle) }.foo();
3533
}
3634
});
3735
x.foo();
38-
future::ready(())
3936
}
4037
}
4138

0 commit comments

Comments
 (0)