Skip to content

Rename std.uri.Path.from_slice to from_iter - #1007

Open
winterqt wants to merge 1 commit into
inko-lang:mainfrom
winterqt:push-uktrlqrlpqzu
Open

Rename std.uri.Path.from_slice to from_iter#1007
winterqt wants to merge 1 commit into
inko-lang:mainfrom
winterqt:push-uktrlqrlpqzu

Conversation

@winterqt

Copy link
Copy Markdown

For most use cases, needing a (usually-)intermediate array is wasteful.

Closes #1003.

For most use cases, needing a (usually-)intermediate array is wasteful.

Closes inko-lang#1003.

Changelog: changed
@winterqt

Copy link
Copy Markdown
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!)

Comment thread std/src/std/uri.inko
# 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')

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

oops, let’s pretend I actually changed it here too — will fix

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@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 😄

@yorickpeterse yorickpeterse Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@winterqt Would you like me to finish this PR, or do you want to take care of it yourself?

@yorickpeterse yorickpeterse added the std Changes related to the standard library label Jul 25, 2026
@yorickpeterse yorickpeterse added this to the 0.22.0 milestone Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

std Changes related to the standard library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

std.uri.Path.from_slice should probably be Path.from_iter

2 participants