1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-22 21:55:10 +02:00

dispatcher internals testing (#1840)

This commit is contained in:
Rob Ede
2020-12-23 01:28:17 +00:00
committed by GitHub
parent 05f104c240
commit 2a7f2c1d59
8 changed files with 519 additions and 58 deletions

View File

@@ -3,13 +3,13 @@ use std::task::{Context, Poll};
use actix_codec::Framed;
use actix_service::{Service, ServiceFactory};
use futures_util::future::Ready;
use futures_util::future::{ready, Ready};
use crate::error::Error;
use crate::h1::Codec;
use crate::request::Request;
pub struct UpgradeHandler<T>(PhantomData<T>);
pub struct UpgradeHandler<T>(pub(crate) PhantomData<T>);
impl<T> ServiceFactory for UpgradeHandler<T> {
type Config = ();
@@ -36,6 +36,6 @@ impl<T> Service for UpgradeHandler<T> {
}
fn call(&mut self, _: Self::Request) -> Self::Future {
unimplemented!()
ready(Ok(()))
}
}