mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-23 21:51:06 +01:00
Fixed unsoundness in AndThenService impl #83
This commit is contained in:
parent
fa800aeba3
commit
a751899aad
@ -1,5 +1,11 @@
|
||||
# Changes
|
||||
|
||||
## [1.0.3] - 2020-01-15
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed unsoundness in `AndThenService` impl
|
||||
|
||||
## [1.0.2] - 2020-01-08
|
||||
|
||||
### Added
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-service"
|
||||
version = "1.0.2"
|
||||
version = "1.0.3"
|
||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||
description = "Actix service"
|
||||
keywords = ["network", "framework", "async", "futures"]
|
||||
|
@ -50,7 +50,7 @@ impl<T: Service> Pipeline<T> {
|
||||
where
|
||||
Self: Sized,
|
||||
F: IntoService<U>,
|
||||
U: Service<Request = T::Response, Error = T::Error>,
|
||||
U: Service<Request = T::Response, Error = T::Error> + 'static,
|
||||
{
|
||||
Pipeline {
|
||||
service: AndThenService::new(self.service, service.into_service()),
|
||||
@ -69,7 +69,7 @@ impl<T: Service> Pipeline<T> {
|
||||
where
|
||||
Self: Sized,
|
||||
I: IntoService<U>,
|
||||
U: Service,
|
||||
U: Service + 'static,
|
||||
F: FnMut(T::Response, &mut U) -> Fut,
|
||||
Fut: Future<Output = Result<Res, Err>>,
|
||||
Err: From<T::Error> + From<U::Error>,
|
||||
@ -88,7 +88,7 @@ impl<T: Service> Pipeline<T> {
|
||||
where
|
||||
Self: Sized,
|
||||
F: IntoService<U>,
|
||||
U: Service<Request = Result<T::Response, T::Error>, Error = T::Error>,
|
||||
U: Service<Request = Result<T::Response, T::Error>, Error = T::Error> + 'static,
|
||||
{
|
||||
Pipeline {
|
||||
service: ThenService::new(self.service, service.into_service()),
|
||||
@ -179,6 +179,7 @@ impl<T: ServiceFactory> PipelineFactory<T> {
|
||||
Error = T::Error,
|
||||
InitError = T::InitError,
|
||||
>,
|
||||
U::Service: 'static,
|
||||
{
|
||||
PipelineFactory {
|
||||
factory: AndThenServiceFactory::new(self.factory, factory.into_factory()),
|
||||
@ -199,6 +200,7 @@ impl<T: ServiceFactory> PipelineFactory<T> {
|
||||
T::Config: Clone,
|
||||
I: IntoServiceFactory<U>,
|
||||
U: ServiceFactory<Config = T::Config, InitError = T::InitError>,
|
||||
U::Service: 'static,
|
||||
F: FnMut(T::Response, &mut U::Service) -> Fut + Clone,
|
||||
Fut: Future<Output = Result<Res, Err>>,
|
||||
Err: From<T::Error> + From<U::Error>,
|
||||
@ -225,6 +227,7 @@ impl<T: ServiceFactory> PipelineFactory<T> {
|
||||
Error = T::Error,
|
||||
InitError = T::InitError,
|
||||
>,
|
||||
U::Service: 'static,
|
||||
{
|
||||
PipelineFactory {
|
||||
factory: ThenServiceFactory::new(self.factory, factory.into_factory()),
|
||||
|
Loading…
Reference in New Issue
Block a user