Skip to content

Commit

Permalink
use impl Future instead of Pin<Box<Future>>
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Napetti committed Mar 15, 2022
1 parent 6bbf159 commit 1854177
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ouroboros_macro/src/info_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ impl StructFieldInfo {
let field_type = &self.typ;
let return_ty_constructor = || {
if make_async {
quote! { ::std::pin::Pin<::std::boxed::Box<dyn ::core::future::Future<Output=#field_type> + 'this>> }
quote! { impl ::core::future::Future<Output=#field_type> + 'this }
} else {
quote! { #field_type }
}
Expand All @@ -262,7 +262,7 @@ impl StructFieldInfo {
let field_type = &self.typ;
let return_ty_constructor = || {
if make_async {
quote! { ::std::pin::Pin<::std::boxed::Box<dyn ::core::future::Future<Output=::core::result::Result<#field_type, Error_>> + 'this>> }
quote! { impl ::core::future::Future<Output=::core::result::Result<#field_type, Error_>> + 'this }
} else {
quote! { ::core::result::Result<#field_type, Error_> }
}
Expand Down

0 comments on commit 1854177

Please sign in to comment.