Rename std.uri.Path.from_slice to from_iter - #1007
Open
winterqt wants to merge 1 commit into
Open
Conversation
For most use cases, needing a (usually-)intermediate array is wasteful. Closes inko-lang#1003. Changelog: changed
Author
|
(Note that I intentionally did not look at the previous attempt at this, though I saw you had made comments. I hope I didn't repeat the same mistakes!) |
winterqt
commented
Jul 24, 2026
| # let comp = path.components.to_array | ||
| # | ||
| # Path.from_slice(comp.slice(0, comp.size - 1)) # => Path('a/b/%20') | ||
| # Path.from_slice(comp.slice(0, comp.size - 1).iter) # => Path('a/b/%20') |
Author
There was a problem hiding this comment.
oops, let’s pretend I actually changed it here too — will fix
Collaborator
There was a problem hiding this comment.
@winterqt I think you meant this when you said you'd fix this so feel free to ignore, but Path.from_slice here should be changed to Path.from_iter 😄
Collaborator
There was a problem hiding this comment.
@winterqt Would you like me to finish this PR, or do you want to take care of it yourself?
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.
For most use cases, needing a (usually-)intermediate array is wasteful.
Closes #1003.