1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

refactor Handler trait, use mut self

This commit is contained in:
Nikolay Kim
2017-12-26 09:00:45 -08:00
parent b61a07a320
commit cf8c2ca95e
14 changed files with 138 additions and 59 deletions

View File

@@ -252,7 +252,7 @@ impl StaticFiles {
impl<S> Handler<S> for StaticFiles {
type Result = Result<FilesystemElement, io::Error>;
fn handle(&self, req: HttpRequest<S>) -> Self::Result {
fn handle(&mut self, req: HttpRequest<S>) -> Self::Result {
if !self.accessible {
Err(io::Error::new(io::ErrorKind::NotFound, "not found"))
} else {