-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround compiler goof in Policy::translate_pk
These previously untested methods result in a compiler error if you ever tried to call them. This happens because if you put &mut in front of the type when you recursively pass it to another call you are actually creating a &mut &mut since the argument may already be a &mut. This ends up in infinite &muts prefix. The compiler only figures this out when you call the method (not at compile time of the library). I fixed this by having an inner function take a &mut FnMut as the argument and so breaking the chain of &mut. The public functions remains the same.
- Loading branch information
Showing
2 changed files
with
58 additions
and
4 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