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

Ignore identity optic when composing #96

Merged
merged 2 commits into from Apr 12, 2024
Merged

Ignore identity optic when composing #96

merged 2 commits into from Apr 12, 2024

Conversation

sunxd3
Copy link
Collaborator

@sunxd3 sunxd3 commented Apr 10, 2024

In Setfield, compose a lens with IdentityLens will give back the lens, ref
https://github.com/jw3126/Setfield.jl/blob/e31e1e361bd6a251124aa578122e6198b81197b5/src/lens.jl#L148-L152

This behavior can't be reimplemented in Accessors because identity is a Base function.

This PR is for backward compatibility.

Copy link
Member

@torfjelde torfjelde left a comment

Choose a reason for hiding this comment

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

LGTM!

@sunxd3 sunxd3 merged commit 6fbeffd into main Apr 12, 2024
10 checks passed
@sunxd3 sunxd3 deleted the sunxd/patch_compose branch April 12, 2024 10:57
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.

None yet

2 participants