refactor(server): Add explicit lifetime annotations for Handler trait

This commit is contained in:
Kevin Butler
2014-12-27 23:15:40 +00:00
parent e5417b834b
commit c592b71d64

View File

@@ -175,7 +175,7 @@ pub trait Handler: Sync + Send {
/// Receives a `Request`/`Response` pair, and should perform some action on them. /// Receives a `Request`/`Response` pair, and should perform some action on them.
/// ///
/// This could reading from the request, and writing to the response. /// This could reading from the request, and writing to the response.
fn handle(&self, Request, Response<Fresh>); fn handle<'a>(&'a self, Request<'a>, Response<'a, Fresh>);
} }
impl<F> Handler for F where F: Fn(Request, Response<Fresh>), F: Sync + Send { impl<F> Handler for F where F: Fn(Request, Response<Fresh>), F: Sync + Send {