Skip to content
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

#1002 Performance of Rejections::into_response is improved. #1005

Conversation

alexeiakimov
Copy link
Contributor

The present PR improves the performance of Rejections::into_response(). Compared to the original approach it calls status only for known or custom instances, which allows to avoid exponential complexity. A test is added to check that the response is computed in a reasonable time, with the original implementation the test fails to complete in 1 minute.

@alexeiakimov
Copy link
Contributor Author

The examples code does not compile with Rust 1.67.0-nightly which complains that impl Reply is not enough to satisfy the bound for Filter::Exract. The compiler suggests to use impl Reply + Tuple instead. This problem is not related to the changes introduced by the present PR and caused by changes in the nightly compiler. @seanmonstar could you please confirm that the compilation issue are not caused by changes being introduced? Thank you.

Copy link
Owner

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving this!

@seanmonstar seanmonstar enabled auto-merge (squash) April 28, 2023 15:12
@seanmonstar seanmonstar merged commit eac30f4 into seanmonstar:master Apr 28, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants