mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-19 00:00:14 +02:00
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:
@@ -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_
|
||||
|
||||
Reference in New Issue
Block a user