Add some debug assertions (#686)

* Add some debug assertions

As discussed in Discord its probably worth having debug assertions for
these two cases, should we accidentally break them in the future.

* remove assertion in `OriginalUri`
This commit is contained in:
David Pedersen
2022-01-03 15:32:35 +00:00
committed by GitHub
parent 8cd9c478fe
commit 86331613f4
+3
View File
@@ -417,6 +417,9 @@ where
Arc::clone(matched_path)
};
req.extensions_mut().insert(MatchedPath(matched_path));
} else {
#[cfg(debug_assertions)]
panic!("should always have a matched path for a route id");
}
let params = match_