-
Notifications
You must be signed in to change notification settings - Fork 355
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
Add transactional helper #357
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like how this simplified things. I am concerned about #[allow(dead_code)]
- it makes me think that something which should be publicly exposed is not, but I assume it is just because something which would later use those internally is in progress.
Yeah, those are just used in some tests. I guess I could remove or conditionally compile. |
96ed35e
to
ddc3223
Compare
let res = action(&mut cache, base)?; | ||
cache.prepare().commit(base); | ||
Ok(res) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice helper / pattern.
api: self.api.deref(), | ||
querier: QuerierWrapper::new(&querier), | ||
}; | ||
action(handler, deps, env) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa, one action inside an action.
Closes #349