Skip to content

Replace channel-based iterators with new-style ones#3272

Merged
peterebden merged 4 commits intothought-machine:masterfrom
peterebden:replace-iterashone
Oct 10, 2024
Merged

Replace channel-based iterators with new-style ones#3272
peterebden merged 4 commits intothought-machine:masterfrom
peterebden:replace-iterashone

Conversation

@peterebden
Copy link
Copy Markdown
Collaborator

We now have a better option than the channel-based approach used previously.

It's overall a bit cleaner (especially not needing the SourcePair struct since we can iterate two things) apart from the need to propagate the return value of yield to handle break (which we didn't need to do earlier; I don't think we ever do break any of these loops but might as well do it properly).

There's quite a few lines changed here but most of it is pretty mechanical. (Also git isn't great at tracking it when a bunch of lines get indented but not otherwise changed...)

@peterebden peterebden merged commit dc692af into thought-machine:master Oct 10, 2024
@peterebden peterebden deleted the replace-iterashone branch October 10, 2024 13:50
@sean-
Copy link
Copy Markdown
Contributor

sean- commented Oct 10, 2024

Drive-by:

There's a toggle to hide whitespace in Github (I don't think this is part of Github Refined, either, but I forget):

image

And also git diff -w will hide whitespace.

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.

3 participants