feat: enable non-'static where possible#765
Open
Daniel-Aaron-Bloom wants to merge 8 commits intotower-rs:masterfrom
Open
feat: enable non-'static where possible#765Daniel-Aaron-Bloom wants to merge 8 commits intotower-rs:masterfrom
Daniel-Aaron-Bloom wants to merge 8 commits intotower-rs:masterfrom
Conversation
ripytide
approved these changes
Jul 19, 2025
Member
|
As a co-maintainer, I am very hesitant about merging breaking changes. I want to leave this up to people who have been involved with the project more (unfortunately that probably means there won't be a decision here for a long time). |
Collaborator
|
That's what I kind of thought when looking at this too, it's a breaking change. We could consider it for the next major release, but I don't know when that is. |
Contributor
|
It's good progress at least though if you maintainers are happy with the change given the requirement that it is merged as part of the next major breaking release and not merged until then. |
Author
|
Are there any labels that could be applied to this PR to ensure it doesn't get forgotten in vNext? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Currently, many tower service wrappers and layers are limited to working with
'statictypes, which limits its usefulness when working with non-statically borrowed things to and from scoped tasks (e.g.async-scoped).Solution
Remove the
'staticrestrictions where possible, mostly by introducing lifetime parameters.This change excludes
BufferandBufferLayerwhich are more difficult to make non-'static.This PR replaces #732