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

Impl. an "at setter" that works with immer::table #178

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

colugomusic
Copy link
Contributor

This allows us to create a cursor to an immer::table element i.e.

struct item { int id; }
struct model {
  immer::table<item> items;
};
...
lager::reader<item> item_123 = store[&model::items][123].zoom(lager::lenses::or_default);

This is currently a compile error because immer::table has no set operation, so the first implementation of at_setter_impl would be selected leading to the invalid assignment.

@arximboldi
Copy link
Owner

This one seems to fail...

@arximboldi
Copy link
Owner

Ah but it's not your fault. Restarting CI...

@arximboldi
Copy link
Owner

CI is failing because of outdated actions. Can you rebase on latest master so we can see a green build/check?

@arximboldi
Copy link
Owner

Other than that, thank you a lot for this contribution, this is very useful... table was introduced relatively recently and Lager hadn't been updated to match yet.

@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2023

Codecov Report

Merging #178 (1890eae) into master (cd62f72) will not change coverage.
The diff coverage is n/a.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##           master     #178   +/-   ##
=======================================
  Coverage   94.47%   94.47%           
=======================================
  Files          80       80           
  Lines        2698     2698           
=======================================
  Hits         2549     2549           
  Misses        149      149           
Impacted Files Coverage Δ
lager/lenses/at.hpp 100.00% <ø> (ø)

@arximboldi arximboldi merged commit eafd650 into arximboldi:master Jun 26, 2023
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