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

Fix delimiter remainder and add capability to split on other delimiters #26

Merged
merged 10 commits into from
Mar 22, 2024

Conversation

GeorgeLyon
Copy link
Owner

Slightly tweaked version of: https://github.com/GeorgeLyon/Shwift/pull/25/files

This PR also fixes an issue with Shwift tests I accidentally introduced in 3.0, and some other light cleanup.

@GeorgeLyon
Copy link
Owner Author

GeorgeLyon commented Mar 22, 2024

@wti Sorry to hijack your PR, but I don't know how to push commits to not-my PR. This should add the requested delimiter functionality to Shwift.

I removed the Script changes and tests (I wasn't too fond of the fake-Decodable thing, and having the functionality exercised in Shwift without any of the Script machinery is nice)... when I have some time I'll try to add the AsyncSequence variant of pipe

I also added Segments as a sibling type to Line so that we can both not change the current API and have a type that is correctly named ("Lines" isn't a good name for things not separated by "\n"). Hopefully soon we'll be able to use some AsyncSequence<Element, any Error>.

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.

2 participants