1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-30 16:34:26 +02:00
Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
fakeshadow
2021-01-04 07:47:04 +08:00
committed by GitHub
parent 1f202d40e4
commit 32de9f8840
75 changed files with 788 additions and 826 deletions

View File

@ -1,6 +1,6 @@
use std::{cell::RefCell, fmt, io, path::PathBuf, rc::Rc};
use actix_service::{boxed, IntoServiceFactory, ServiceFactory};
use actix_service::{boxed, IntoServiceFactory, ServiceFactory, ServiceFactoryExt};
use actix_web::{
dev::{
AppService, HttpServiceFactory, ResourceDef, ServiceRequest, ServiceResponse,
@ -201,10 +201,10 @@ impl Files {
/// Sets default handler which is used when no matched file could be found.
pub fn default_handler<F, U>(mut self, f: F) -> Self
where
F: IntoServiceFactory<U>,
F: IntoServiceFactory<U, ServiceRequest>,
U: ServiceFactory<
ServiceRequest,
Config = (),
Request = ServiceRequest,
Response = ServiceResponse,
Error = Error,
> + 'static,
@ -241,8 +241,7 @@ impl HttpServiceFactory for Files {
}
}
impl ServiceFactory for Files {
type Request = ServiceRequest;
impl ServiceFactory<ServiceRequest> for Files {
type Response = ServiceResponse;
type Error = Error;
type Config = ();

View File

@ -57,8 +57,7 @@ impl fmt::Debug for FilesService {
}
}
impl Service for FilesService {
type Request = ServiceRequest;
impl Service<ServiceRequest> for FilesService {
type Response = ServiceResponse;
type Error = Error;
type Future = FilesServiceFuture;