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

feat: Make new functions const when possible #760

Merged
merged 4 commits into from
Jul 20, 2024

Conversation

kerkmann
Copy link
Contributor

@kerkmann kerkmann commented Jan 7, 2024

The main reason was to allow to initialize the RateLimitLayer in a const context. So why not making ever new function const (wherever it's possible). :P

The main reason was to allow to initialize the RateLimitLayer in a const context.
So why not making ever new function const (wherever it's possible). :P
@tobz tobz added the C-enhancement Category: A PR with an enhancement or a proposed on in an issue. label Jul 20, 2024
@tobz
Copy link
Member

tobz commented Jul 20, 2024

This is blocked on the MSRV, which would need to be at least 1.61 to support generic trait bounds on const functions.

Parking for now.

@tobz tobz added the S-blocked Status: marked as blocked ❌ on something else such as a PR or other implementation work. label Jul 20, 2024
@tobz tobz merged commit 89ac74f into tower-rs:master Jul 20, 2024
14 checks passed
@tobz tobz added relnotes Marks issues that should be documented in the release notes of the next release. S-awaiting-release Status: approved/merged but awaiting a release. and removed S-blocked Status: marked as blocked ❌ on something else such as a PR or other implementation work. labels Jul 20, 2024
@tobz
Copy link
Member

tobz commented Aug 13, 2024

This has been released as part of [email protected], [email protected], and [email protected].

Thanks again for your contribution!

@tobz tobz removed the S-awaiting-release Status: approved/merged but awaiting a release. label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A PR with an enhancement or a proposed on in an issue. relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants