Skip to content

Commit 2b94645

Browse files
luisholandadwrensha
authored andcommitted
remove remaining async block from codegen
This was probably forgotten. Now the code is truly compatible with old Rust editions.
1 parent 32164c0 commit 2b94645

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

capnpc/src/codegen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2653,7 +2653,7 @@ fn generate_node(
26532653

26542654
server_interior.push(
26552655
Line(fmt!(ctx,
2656-
"fn {}(self: {capnp}::capability::Rc<Self>, _: {}Params<{}>) -> impl ::core::future::Future<Output = Result<(), {capnp}::Error>> + 'static {{ async {{ Err({capnp}::Error::unimplemented(\"method {}::Server::{} not implemented\".to_string())) }} }}",
2656+
"fn {}(self: {capnp}::capability::Rc<Self>, _: {}Params<{}>) -> impl ::core::future::Future<Output = Result<(), {capnp}::Error>> + 'static {{ ::core::future::ready(Err({capnp}::Error::unimplemented(\"method {}::Server::{} not implemented\".to_string()))) }}",
26572657
module_name(name),
26582658
capitalize_first_letter(name), params_ty_params,
26592659
node_name, module_name(name)

capnpc/test/test.capnp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,3 +861,7 @@ struct Issue260(T, Q) {
861861
val2 @3 :Int8;
862862
}
863863
}
864+
865+
interface TestStream {
866+
send @0 (data : Data) -> stream;
867+
}

0 commit comments

Comments
 (0)