You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having infallible extractors makes them less flexible, it's generally better to let the user decide if they want the extraction to fail or not, especially considering the fact that you can use the Option extractor for any infallible extractions, i.e:
Option::<HxTarget>::from_request_parts(..)
The text was updated successfully, but these errors were encountered:
Then if I wanted to do an infallible extraction here I would just do
Option::<MyTarget>::from_request_parts(..)
But since HxTarget is always infallible, I have to explicitly handle the case where it might be None even though we just want to propagate whatever error the extraction would return in case the header wasn't present.
It basically breaks the chain of extractors by having an infallible extractor that otherwise could be considered fallible.
Having infallible extractors makes them less flexible, it's generally better to let the user decide if they want the extraction to fail or not, especially considering the fact that you can use the Option extractor for any infallible extractions, i.e:
The text was updated successfully, but these errors were encountered: