Merge branch 'master' into fix-event-bubbling
This commit is contained in:
1 parent
c8fca7b321
commit
98335bd9a6
368 files changed
+1877
-13498
No files matched your search
@@ -210,7 +210,7 @@ pub fn routable(input: TokenStream) -> TokenStream {
|
||||
let display_impl = route_enum.impl_display();
|
||||
let routable_impl = route_enum.routable_impl();
|
||||
|
||||
quote! {
|
||||
(quote! {
|
||||
#error_type
|
||||
|
||||
#display_impl
|
||||
@@ -218,7 +218,7 @@ pub fn routable(input: TokenStream) -> TokenStream {
|
||||
#routable_impl
|
||||
|
||||
#parse_impl
|
||||
}
|
||||
})
|
||||
.into()
|
||||
}
|
||||
|
||||
@@ -678,9 +678,9 @@ impl ToTokens for SegmentType {
|
||||
impl<'a> From<&'a RouteSegment> for SegmentType {
|
||||
fn from(value: &'a RouteSegment) -> Self {
|
||||
match value {
|
||||
segment::RouteSegment::Static(s) => SegmentType::Static(s.to_string()),
|
||||
segment::RouteSegment::Dynamic(s, _) => SegmentType::Dynamic(s.to_string()),
|
||||
segment::RouteSegment::CatchAll(s, _) => SegmentType::CatchAll(s.to_string()),
|
||||
RouteSegment::Static(s) => SegmentType::Static(s.to_string()),
|
||||
RouteSegment::Dynamic(s, _) => SegmentType::Dynamic(s.to_string()),
|
||||
RouteSegment::CatchAll(s, _) => SegmentType::CatchAll(s.to_string()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -277,10 +277,8 @@ impl Route {
|
||||
}
|
||||
}
|
||||
for segment in &self.segments {
|
||||
if let RouteSegment::Dynamic(other, ..) = segment {
|
||||
if other == name {
|
||||
from_route = true
|
||||
}
|
||||
if segment.name().as_ref() == Some(name) {
|
||||
from_route = true
|
||||
}
|
||||
}
|
||||
if let Some(query) = &self.query {
|
||||
|
||||
@@ -25,7 +25,7 @@ impl RouteSegment {
|
||||
match self {
|
||||
Self::Static(segment) => quote! { write!(f, "/{}", #segment)?; },
|
||||
Self::Dynamic(ident, _) => quote! { write!(f, "/{}", #ident)?; },
|
||||
Self::CatchAll(ident, _) => quote! { #ident.display_route_segements(f)?; },
|
||||
Self::CatchAll(ident, _) => quote! { #ident.display_route_segments(f)?; },
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user