-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove one type parameter in trait with associated type
This patch removes one level of generic by transforming it to an associated type. This improves usability of the traits because of fewer generics. Also, generic output values are problematic because every function which wants to be generic over the trait has also to be generic over the generic return type of the functions of the trait (see rust documentation on associated types). This patch improves this.
- Loading branch information
1 parent
3490a35
commit c29b7eb
Showing
3 changed files
with
23 additions
and
12 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
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