saulecabrera opened PR #6075 from store-in-epoch-callback
to main
:
This commit changes the signature of the
Store::epoch_deadline_callback
to
take inStoreContextMut
instead of a mutable reference to the store's data.This is useful in cases in which the callback definition needs access to the
Store to be able to use other methods that take inAsContext
/AsContextMut
,
like for exampleWasmtimeBacktrace::capture
I decided to only pass in
StoreContextMut
as the data is accessible through it
viadata
anddata_mut
, but also happy to have them both if there are specific
reasons to do so.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
--><!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
saulecabrera requested alexcrichton for a review on PR #6075.
alexcrichton submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Could the
.borrow_mut()
be dropped here?(I'm not actually sure even where this method comes from!)
saulecabrera updated PR #6075 from store-in-epoch-callback
to main
.
alexcrichton has enabled auto merge for PR #6075.
saulecabrera submitted PR review.
saulecabrera created PR review comment:
Yeah, I was able to make this work by switching to
(&mut *self)
.
alexcrichton merged PR #6075.
Last updated: Dec 23 2024 at 12:05 UTC