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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify app-facing API of crux_kv #231

Merged
merged 3 commits into from
May 15, 2024
Merged

Simplify app-facing API of crux_kv #231

merged 3 commits into from
May 15, 2024

Conversation

charypar
Copy link
Member

This should make crux_kv a bit more idiomatic to use from inside the core. It no longer forces the user to deal with receiving a response to the wrong operation (which shouldn't happen anyway so is largely just boilerplate), and also works on standard Results rather than the FFI protocol result.

I've only changed the capability and its tests, haven't done examples in case people are violently opposed to this 馃檪

crux_kv/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@StuartHarris StuartHarris left a comment

Choose a reason for hiding this comment

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

This is so much better. I'll update the book with doing this as a "best practice" in another PR

@StuartHarris StuartHarris merged commit 9d37cf3 into master May 15, 2024
9 checks passed
@StuartHarris StuartHarris deleted the viktor/simpler-kv branch May 15, 2024 11:21
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

3 participants