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

Add delete_async hostcall for kv #332

Merged
merged 1 commit into from
Dec 1, 2023
Merged

Conversation

computermouth
Copy link
Contributor

Tested good on the local machine with an sdk which also has the hostcall

Copy link
Contributor Author

@computermouth computermouth Nov 10, 2023

Choose a reason for hiding this comment

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

Not 100% sure about this change. I needed to differentiate the

impl From<PendingKvInsertTask> for AsyncItem

and

impl From<PendingKvDeleteTask> for AsyncItem

... traits, which couldn't be done with the type alias, so I went for the struct newtypes. Hopefully the new/task isn't too silly. It was either that or sprinkle some pub everywhere, figured this was more idiomatic.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, this is exactly the right thing to do. Not the prettiest, but things can get a bit messy when you go far enough with the type system :)

Copy link
Contributor

@aturon aturon left a comment

Choose a reason for hiding this comment

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

This looks great! ✨

@computermouth computermouth merged commit f01abd0 into main Dec 1, 2023
7 checks passed
@computermouth computermouth deleted the byoung/kv-delete-async branch December 1, 2023 19:26
cmckendry pushed a commit to 1stdibs/Viceroy that referenced this pull request Feb 8, 2024
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.

2 participants