Skip to content

Commit

Permalink
fix: route prefix is always reset to false after nesting a server
Browse files Browse the repository at this point in the history
  • Loading branch information
mendelt committed Sep 27, 2020
1 parent eaad5b6 commit 75e2df0
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 75e2df0

Please sign in to comment.