mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-26 00:00:23 +02:00
Support Option and Result in typed paths (#1001)
* Support `Option` and `Result` in typed paths * changelog * Update axum-extra/CHANGELOG.md Co-authored-by: Jonas Platte <[email protected]> * fix one more Co-authored-by: Jonas Platte <[email protected]>
This commit is contained in:
co-authored by
Jonas Platte
parent
d19beffd6d
commit
4ff78e552d
@@ -190,6 +190,26 @@ macro_rules! impl_first_element_is {
|
||||
where
|
||||
P: TypedPath
|
||||
{}
|
||||
|
||||
impl<P, $($ty,)*> FirstElementIs<P> for (Option<P>, $($ty,)*)
|
||||
where
|
||||
P: TypedPath
|
||||
{}
|
||||
|
||||
impl<P, $($ty,)*> Sealed for (Option<P>, $($ty,)*)
|
||||
where
|
||||
P: TypedPath
|
||||
{}
|
||||
|
||||
impl<P, E, $($ty,)*> FirstElementIs<P> for (Result<P, E>, $($ty,)*)
|
||||
where
|
||||
P: TypedPath
|
||||
{}
|
||||
|
||||
impl<P, E, $($ty,)*> Sealed for (Result<P, E>, $($ty,)*)
|
||||
where
|
||||
P: TypedPath
|
||||
{}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user