actix-ratelimit
actix-ratelimit copied to clipboard
Upgrade the project to Actix 4.0.0
This is not yet finalized, as there is some substantial change in the source code.
More specifically, there happen to have Request type param removed in several traits, and that MailboxError does not implement ResponseError anymore. I substituted ServiceRequest into the type param and it should work as intended.
I workaround the latter by adding an extra function call ErrorInternalServerError using map_err to wrap the error up. It's a convenient workaround but it's not very effective. I checked the diff from 3.x to 4.x and see that from MailboxError to ResponseError is transformed to an ISE, this is how I come up with this idea.
Yet, copy pasting map_err(ErrorInternalServerError) isn't very fun and tedious, but since this is an upstream Actix problem, why don't we just go blind first for a few moments.
Until the review passed on the ISE part and all the crate has graduated from beta then, let's keep it a draft.
Is this going forward? Actix 4 is long out of beta (only actix-rt, upz)
any update of this one ?
The user making this has dissapeared from the face of the world. So now somebody else has to do it. I'll check it out.
The user making this has dissapeared from the face of the world. So now somebody else has to do it. I'll check it out.
See my pull request here for working actix4 code