1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 00:50:20 +02:00

fix state factory support, tests for state and state factory

This commit is contained in:
Nikolay Kim
2019-03-03 21:40:03 -08:00
parent 34171fa7f5
commit 5c61321565
3 changed files with 208 additions and 6 deletions

View File

@@ -272,7 +272,7 @@ where
}
}
fn insert_slash(path: &str) -> String {
pub(crate) fn insert_slash(path: &str) -> String {
let mut path = path.to_owned();
if !path.is_empty() && !path.starts_with('/') {
path.insert(0, '/');