diff --git a/src/summary.rs b/src/summary.rs index 71162da..75fede3 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -1986,8 +1986,8 @@ from ..types import Result, Ok, Err, Some "{docs}{python_imports} from .types import Result, Ok, Err, Some {imports} -{function_imports} {type_exports} +{function_imports} {protocol} " )?; diff --git a/src/test/tests.rs b/src/test/tests.rs index 9b2c9da..c64c04b 100644 --- a/src/test/tests.rs +++ b/src/test/tests.rs @@ -57,6 +57,13 @@ pub struct ThingList(Vec); pub struct ThingString(String); pub struct MyFloat(f64); +#[async_trait] +impl TestsImports for Ctx { + async fn output(&mut self, _: Frame) -> Result<()> { + unreachable!() + } +} + macro_rules! load_guest_code { ($($input_string:expr),*) => { &[ diff --git a/src/test/wit/tests.wit b/src/test/wit/tests.wit index 75fef09..acc58c7 100644 --- a/src/test/wit/tests.wit +++ b/src/test/wit/tests.wit @@ -179,4 +179,10 @@ world tests { export add: func(a: borrow, b: borrow) -> own; export read-file: func(path: string) -> result, string>; + + record frame { + id: s32, + } + + import output: func(frame: frame); }