Skip to content

Commit 82b3472

Browse files
committedJan 14, 2025
fix(bindgen/rust): account for flat async values in variants
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
1 parent a997e83 commit 82b3472

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎crates/wit-bindgen-rust/src/interface.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1894,8 +1894,8 @@ mod {mod_name} {{
18941894
} else {
18951895
let tokio = self.gen.tokio_path().to_string();
18961896

1897-
let (paths, _) = async_paths_tyid(self.resolve, id);
1898-
if paths.is_empty() {
1897+
let (paths, fut) = async_paths_tyid(self.resolve, id);
1898+
if !fut && paths.is_empty() {
18991899
uwrite!(
19001900
self.src,
19011901
r#"
@@ -1953,7 +1953,7 @@ mod {mod_name} {{
19531953
);
19541954

19551955
let mut names = vec![format!("super::{name}")];
1956-
if paths.is_empty() {
1956+
if !fut && paths.is_empty() {
19571957
names.extend_from_slice(&[
19581958
format!("&super::{name}"),
19591959
format!("&&super::{name}"),

0 commit comments

Comments
 (0)
Failed to load comments.