You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: middleware.rs
    path of file: ./repos/actix-web-httpauth/src
    
    the code of the file until where you have to start completion: //! HTTP Authentication middleware.

use std::marker::PhantomData;
use std::pin::Pin;
use std::sync::Arc;

use actix_service::{Service, Transform};
use actix_web::dev::{ServiceRequest, ServiceResponse};
use actix_web::Error;
use futures::future::{self, Future, FutureExt, LocalBoxFuture, TryFutureExt};
use futures::lock::Mutex;
use futures::task::{Context, Pol
    
    fn call(&mut self, req: Self::Request) -> Self::Future {
        let process_fn = self.process_fn.clone();
        // Note: cloning the mutex, not the service itself
        let inner = self.service.clone();

        async move {
            let (req, credentials) = Extract::<T>::new(req).await?;
            let req = process_fn(req, credentials).await?;
            let mut service = inner.lock().await;
            service.call(req).await
        }
        .boxed_local()
    }