1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 09:59:21 +02:00

simplify middleware api; fix examples

This commit is contained in:
Nikolay Kim
2017-11-26 21:47:33 -08:00
parent 5a3b6638a7
commit fdafb0c848
11 changed files with 74 additions and 64 deletions

View File

@ -61,9 +61,9 @@ struct MiddlewareTest {
}
impl middlewares::Middleware for MiddlewareTest {
fn start(&self, req: HttpRequest) -> middlewares::Started {
fn start(&self, _: &mut HttpRequest) -> middlewares::Started {
self.start.store(self.start.load(Ordering::Relaxed) + 1, Ordering::Relaxed);
middlewares::Started::Done(req)
middlewares::Started::Done
}
fn response(&self, _: &mut HttpRequest, resp: HttpResponse) -> middlewares::Response {