File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ impl<T> Node<T> {
199199 let next = remaining[ 0 ] ;
200200
201201 // For parameters with a suffix, we have to find the matching suffix or create a new child node.
202- if matches ! ( state . node ( ) . node_type , NodeType :: Param { .. } ) {
202+ if let NodeType :: Param { suffix : has_suffix } = state . node ( ) . node_type {
203203 let terminator = remaining
204204 . iter ( )
205205 . position ( |& b| b == b'/' )
@@ -248,9 +248,10 @@ impl<T> Node<T> {
248248 priority : 1 ,
249249 ..Node :: default ( )
250250 } ) ;
251- let has_suffix = matches ! ( state . node ( ) . node_type , NodeType :: Param { suffix : true } )
252- || !matches ! ( * suffix, b"" | b"/" ) ;
251+
252+ let has_suffix = has_suffix || !matches ! ( * suffix, b"" | b"/" ) ;
253253 state. node_mut ( ) . node_type = NodeType :: Param { suffix : has_suffix } ;
254+
254255 state = state. set_child ( child) ;
255256
256257 // If this is the final route segment, insert the value.
You can’t perform that action at this time.
0 commit comments