Merge branch 'DioxusLabs:master' into dedup-history
This commit is contained in:
2 files changed
+8
-2
No files matched your search
@@ -485,7 +485,13 @@ impl RouteEnum {
|
|||||||
let mut segments = route.split('/');
|
let mut segments = route.split('/');
|
||||||
// skip the first empty segment
|
// skip the first empty segment
|
||||||
if s.starts_with('/') {
|
if s.starts_with('/') {
|
||||||
segments.next();
|
let _ = segments.next();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// if this route does not start with a slash, it is not a valid route
|
||||||
|
return Err(dioxus_router::routable::RouteParseError {
|
||||||
|
attempted_routes: Vec::new(),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
let mut errors = Vec::new();
|
let mut errors = Vec::new();
|
||||||
|
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ impl<'a> RouteTreeSegmentData<'a> {
|
|||||||
let child_name = &child.ident;
|
let child_name = &child.ident;
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
let mut trailing = String::new();
|
let mut trailing = String::from("/");
|
||||||
for seg in segments.clone() {
|
for seg in segments.clone() {
|
||||||
trailing += seg;
|
trailing += seg;
|
||||||
trailing += "/";
|
trailing += "/";
|
||||||
|
|||||||
Reference in new issue
Block a user