splix commented on issue #136: URL: https://github.com/apache/avro-rs/issues/136#issuecomment-2683366976
For this particular example it's possible to move out the duplicate part into an _inline_ function, and keep only `decode_variable_async(reader).await?;` and `decode_variable_async(reader)?;` depending on the variant. Another option is wrapping those with some macros which depending on the compilation target adds `.await` or not. Anyway, I agree that both options are bit ugly. Or actually I think that many functions like this one could be transformed to something more universal which could work in both ways. I'm worried mostly about the fact that too many things must be touched to support async. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
