-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Blanket-impl for
&B
and Box<B>
instead of Deref
This way is recommended by dtolnay (rust-lang/api-guidelines#158) and the "Rust for Rustaceans" book (paragraph "Ergonomic Trait Implementations"). This leads to better compiler error messages when you pass something that doesn't `impl BlockStore` the right way. `rand_core` explicitly decided against a `DerefMut` blanket implementation for `trait RngCore`.
- Loading branch information
Showing
1 changed file
with
29 additions
and
7 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