StractOrg / stract

web search done right
https://stract.com
GNU Affero General Public License v3.0
2.13k stars 48 forks source link

Remove `#[async_trait]` #119

Closed oeb25 closed 9 months ago

oeb25 commented 9 months ago

In the next Rust release we will get async_fn_in_trait and return_position_impl_trait_in_traitwhich removes the need for the async-trait crate! 🎉

This PR performs the necessary changes in order to make the code work with these new features. ~Since they haven't been merged, the features are currently enabled with #![feature(...)] which obviously should be removed before this is merged.~

~One slight hiccupy is explained in https://github.com/StractOrg/stract/pull/119/commits/41c91b451434bc1026bfd50d6dc3b85777e7a181, but I think that approach is quite acceptable. Let me know what you think!~ Edit: This seems to be quite standard practice by looking at other crates transitioning, so I don't think it's anything to worry about.

oeb25 commented 9 months ago

Works on stable now! 🎉