mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-29 00:07:48 +02:00
Handler::handle uses &self instead of mutabble reference
This commit is contained in:
@@ -282,9 +282,9 @@ impl<S: 'static> ResourceHandler<S> {
|
||||
}
|
||||
|
||||
pub(crate) fn handle(
|
||||
&mut self, mut req: HttpRequest<S>,
|
||||
&self, mut req: HttpRequest<S>,
|
||||
) -> Result<AsyncResult<HttpResponse>, HttpRequest<S>> {
|
||||
for route in &mut self.routes {
|
||||
for route in &self.routes {
|
||||
if route.check(&mut req) {
|
||||
return if self.middlewares.borrow().is_empty() {
|
||||
Ok(route.handle(req))
|
||||
|
Reference in New Issue
Block a user