-
-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor body decoding filters to be zero-sized
- Loading branch information
1 parent
5096aed
commit e725bca
Showing
2 changed files
with
95 additions
and
56 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
e725bca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than having
BoxError
, you could definetype Error
withinDecode
, and set it to the appropriate serde errors, then changeResult<T, BoxError>
toResult<T, Self::Error>
, andreject::known(BodyDeserializeError { cause: err })
toreject::known(BodyDeserializeError { cause: err.into() })
. It would save a single mapping operation.