File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ impl<T> Node<T> {
319319
320320 // Similarly, we are inserting a parameter suffix and this node already has a parameter
321321 // prefix, we have a prefix-suffix conflict.
322- let suffix = remaining. slice_off ( wildcard. end ) ;
322+ let suffix = remaining. slice_until ( terminator ) . slice_off ( wildcard. end ) ;
323323 if !matches ! ( * suffix, b"" | b"/" ) && node. prefix_wild_child_in_segment ( ) {
324324 return Err ( InsertError :: conflict ( & route, remaining, node) ) ;
325325 }
Original file line number Diff line number Diff line change @@ -255,6 +255,8 @@ fn prefix_suffix_conflict() {
255255 ( "/x15/prefix{a}" , Ok ( ( ) ) ) ,
256256 ( "/x16/{*rest}" , Ok ( ( ) ) ) ,
257257 ( "/x16/prefix{a}suffix" , Ok ( ( ) ) ) ,
258+ ( "/x17/prefix{a}/z" , Ok ( ( ) ) ) ,
259+ ( "/x18/prefix{a}/z" , Ok ( ( ) ) ) ,
258260 ] )
259261 . run ( )
260262}
You can’t perform that action at this time.
0 commit comments