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

Allow normalization to completely eliminate markers #4271

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

normalize now takes an owned value and returns Option<MarkerTree>, such that if any sub-expression evaluates to true, we can normalize out the entire marker.

Closes #4267.

@charliermarsh charliermarsh added the bug Something isn't working label Jun 12, 2024
match tree {
MarkerTree::And(trees) | MarkerTree::Or(trees) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

I split these into separate branches. There's a little bit of duplication, but it makes things easier with ownership (and the branches now have more deviations than before between the two cases).

Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

Nice!

@charliermarsh charliermarsh merged commit aef74da into main Jun 12, 2024
47 checks passed
@charliermarsh charliermarsh deleted the charlie/norm branch June 12, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uv add struggles with an auto-generated entry in uv.lock
2 participants