-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(wallet): allow PersistedWallet<P> to be Send + Sync even if P is …
…!Sync The goal of this change is to ensure that PersistWallet<P> remains Send and Sync, even if the functions implemented on it have a &mut P parameter and P is not Sync. The reason to change PersistWallet<P>'s _marker field type from PhatonData<P> to PhantomData<fn(&mut P)> is to tell the Rust compiler that this struct is a "consumer" of &mut P, but it does not own P and therefore should not be tied to its lifetime.
- Loading branch information
1 parent
3abde00
commit 14251a4
Showing
2 changed files
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters