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: use slice patterns over iterator #704

Merged
merged 2 commits into from
May 30, 2024
Merged

fix: use slice patterns over iterator #704

merged 2 commits into from
May 30, 2024

Conversation

ErinvanderVeen
Copy link
Collaborator

@ErinvanderVeen ErinvanderVeen commented May 8, 2024

Slices for post_processing!

Description

This PR refactors our post_process_inner function to use slice pattern matching instead of the previous iterator based approach.

Motivation

Reason for this change it to make it easier to extend the match for patterns longer than just the first 2 atoms (which is something I wanted to do to fix #701).

Checklist

Checklist before merging:

  • CHANGELOG.md updated

@ErinvanderVeen ErinvanderVeen marked this pull request as ready for review May 15, 2024 08:45
Copy link
Member

@Xophmeister Xophmeister left a comment

Choose a reason for hiding this comment

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

There's quite a lot going on here, but it looks good 👍 Maybe expanding the comments would be worthwhile, to make it a bit easier to follow -- to preserve future maintainers' sanity -- but this is not a blocker.

topiary-core/src/lib.rs Show resolved Hide resolved
@ErinvanderVeen ErinvanderVeen merged commit 93aeaa3 into main May 30, 2024
9 checks passed
@ErinvanderVeen ErinvanderVeen deleted the slice-patterns branch May 30, 2024 12:45
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.

allow_blank_line_before is only relative to the input
2 participants