-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use boxed dyn callbacks to get rid of some type parameters (#1215)
* refactor: get rid of database type parameter on RequestAuthorizationHandler this is step 1 of boxing this thing. rationale: Databases are cheaply cloneable, so if you need access to a database in your RequestAuthorizationHandler, just inject a clone during creation. In any case, the database you want for auth is probably not the database that contains the blobs. * refactor: also remove db parameter for CustomGetRequest ...and take advantage of the whole thing to remove 2 type parameters from the builder. we are going to need moar type parameters for something else, but here they are not pulling their weight. * refactor: move default impls from iroh-bytes into iroh and make them private since we are using Arc<dyn ...> the type of the dummy handler does not need to be public.
- Loading branch information
Showing
5 changed files
with
98 additions
and
118 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
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
Oops, something went wrong.