Skip to content

Commit

Permalink
fix(bindgen/rust): account for flat async values in variants
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Jan 14, 2025
1 parent 63876a2 commit 904db64
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/wit-bindgen-rust/src/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1894,8 +1894,8 @@ mod {mod_name} {{
} else {
let tokio = self.gen.tokio_path().to_string();

let (paths, _) = async_paths_tyid(self.resolve, id);
if paths.is_empty() {
let (paths, fut) = async_paths_tyid(self.resolve, id);
if !fut && paths.is_empty() {
uwrite!(
self.src,
r#"
Expand Down Expand Up @@ -1953,7 +1953,7 @@ mod {mod_name} {{
);

let mut names = vec![format!("super::{name}")];
if paths.is_empty() {
if !fut && paths.is_empty() {
names.extend_from_slice(&[
format!("&super::{name}"),
format!("&&super::{name}"),
Expand Down

0 comments on commit 904db64

Please sign in to comment.