From 0de47211b2065d48a6ac7d341870b05ab5db8f79 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 5 Mar 2019 19:30:44 -0800 Subject: [PATCH] tune App::default_resource signature --- src/app.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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(