Skip to content

Commit

Permalink
Merge pull request #702 from mendelt/fix_route_prefix_after_nest
Browse files Browse the repository at this point in the history
Bugfix, route prefix was always set to false after calling nest
  • Loading branch information
yoshuawuyts authored Sep 27, 2020
2 parents 7a5ac3e + a138f20 commit 563091e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,12 @@ impl<'a, State: Clone + Send + Sync + 'static> Route<'a, State> {
State: Clone + Send + Sync + 'static,
InnerState: Clone + Send + Sync + 'static,
{
let prefix = self.prefix;

self.prefix = true;
self.all(service);
self.prefix = false;
self.prefix = prefix;

self
}

Expand Down

0 comments on commit 563091e

Please sign in to comment.