From a138f2004df6d5050a25f99a7469ee5c255435e7 Mon Sep 17 00:00:00 2001 From: Mendelt Siebenga Date: Mon, 21 Sep 2020 22:36:39 +0200 Subject: [PATCH] fix: route prefix is always reset to false after nesting a server --- src/route.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/route.rs b/src/route.rs index da71b747a..6f9e8c006 100644 --- a/src/route.rs +++ b/src/route.rs @@ -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 }