diff --git a/src/app.rs b/src/app.rs index e38180c4f..27ca5c956 100644 --- a/src/app.rs +++ b/src/app.rs @@ -426,12 +426,15 @@ where /// /// Default resource works with resources only and does not work with /// custom services. - pub fn default_resource(mut self, f: F) -> Self + pub fn default_resource(mut self, f: F) -> Self where - F: FnOnce(Resource

) -> R, - R: IntoNewService>, - U: NewService, Response = ServiceResponse, Error = ()> - + 'static, + F: FnOnce(Resource

) -> Resource, + U: NewService< + ServiceRequest

, + Response = ServiceResponse, + Error = (), + InitError = (), + > + 'static, { // create and configure default resource self.default = Some(Rc::new(boxed::new_service(