-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove redundant Sync
bound
#319
Conversation
Thank you @evyatark2 for this first contribution of yours to Rama!
Thanks for that advice, it does make sense. Will take this into account. |
You welcome! On a side note, I was wondering if it would be welcome to use the experimental feature RTN? If you prefer to use stable rust, would it still be welcome to conditionally use RTN by introducing a new cargo feature like |
I have played with that feature before in an early version of rama and/or tower-async. Can you elaborate on why you are needing that, e.g. what are you missing in rama |
It would be nice to have non- |
Would being able to mutate the |
It was me on Discord :) That would solve what I had trouble with, but making the futures non- |
I am not really inclined to make that work, no. |
It would be a big change in the sense that it is a lot of boilerplate with |
That's what I mean indeed
I do not want to stop inovation, so I do not want to right out say no to this. That might mean that the codebase doesn't compile / check at that moment due to many errors. That's ok, |
Sure! I'll go right ahead |
Because of syntax parity between stable rust and nightly rust, it seems like currently it is not possible to support this feature in the way I wanted to. Guess we'll just wait for it to stabilize |
Fair enough. Sorry to hear that. I did play with this syntax before. You can probably find a very old commit of Rama where I was using that RTN. At that time rama was still unstable-only. At that time I was waiting until either For now it's however a bit of a restricted way to work with all those implicit bounds that only work easy if you just enforce it always. I understand however that it overly restricts legit use cases like yours. I want to make clear however that I want to continue to evolve and develop rama alongside how Rust and its ecosystem evolves. As such there's a banner that says there are no current plants to go to a "1.0". That's not because I like to break code nilly-willy. Because once we have a first release (0.2) I will be more mindful of that. However, it does mean that we do need significant breaking changes as the world around us matures, and we mature with it. Feedback from people and contributors like yourself, and help, is also very welcome and will ensure to contribute to that. |
This PR removes a redundant
Sync
bound on the future that is returned byf
inserve_fn()
Futures generally shouldn't be
Sync
. This caused errors when working with functions whose return type isimpl Future<...> + Send