diff --git a/src/httprequest.rs b/src/httprequest.rs index 6d763e2f3..ce0667ba0 100644 --- a/src/httprequest.rs +++ b/src/httprequest.rs @@ -644,6 +644,7 @@ mod tests { use router::Pattern; use resource::Resource; use test::TestRequest; + use server::ServerSettings; #[test] fn test_debug() { @@ -720,7 +721,7 @@ mod tests { resource.name("index"); let mut map = HashMap::new(); map.insert(Pattern::new("index", "/{key}/"), Some(resource)); - let (router, _) = Router::new("", map); + let (router, _) = Router::new("", ServerSettings::default(), map); assert!(router.recognize(&mut req).is_some()); assert_eq!(req.match_info().get("key"), Some("value")); @@ -822,7 +823,7 @@ mod tests { resource.name("index"); let mut map = HashMap::new(); map.insert(Pattern::new("index", "/user/{name}.{ext}"), Some(resource)); - let (router, _) = Router::new("", map); + let (router, _) = Router::new("", ServerSettings::default(), map); assert!(router.has_route("/user/test.html")); assert!(!router.has_route("/test/unknown")); @@ -849,7 +850,7 @@ mod tests { resource.name("index"); let mut map = HashMap::new(); map.insert(Pattern::new("youtube", "https://youtube.com/watch/{video_id}"), None); - let (router, _) = Router::new::<()>("", map); + let (router, _) = Router::new::<()>("", ServerSettings::default(), map); assert!(!router.has_route("https://youtube.com/watch/unknown")); let req = req.with_state(Rc::new(()), router); diff --git a/src/router.rs b/src/router.rs index 2300dce55..92eb01c3e 100644 --- a/src/router.rs +++ b/src/router.rs @@ -312,7 +312,7 @@ mod tests { routes.insert(Pattern::new("", "/v{val}/{val2}/index.html"), Some(Resource::default())); routes.insert(Pattern::new("", "/v/{tail:.*}"), Some(Resource::default())); routes.insert(Pattern::new("", "{test}/index.html"), Some(Resource::default())); - let (rec, _) = Router::new::<()>("", routes); + let (rec, _) = Router::new::<()>("", ServerSettings::default(), routes); let mut req = HttpRequest::new( Method::GET, Uri::from_str("/name").unwrap(),