From 810fa869ae54b5a6d50cd90d503caedad094416c Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Thu, 4 Apr 2019 10:04:19 -0700 Subject: [PATCH] remove unneeded static --- actix-utils/CHANGES.md | 7 +++++++ actix-utils/Cargo.toml | 2 +- actix-utils/src/cloneable.rs | 8 ++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/actix-utils/CHANGES.md b/actix-utils/CHANGES.md index 00bed130..ceaac115 100644 --- a/actix-utils/CHANGES.md +++ b/actix-utils/CHANGES.md @@ -1,9 +1,16 @@ # Changes + +## [0.3.5] - 2019-04-04 + ### Added * Allow to send messages to `FramedTransport` via mpsc channel. +### Changed + +* Remove 'static constraint from Clonable service + ## [0.3.4] - 2019-03-12 diff --git a/actix-utils/Cargo.toml b/actix-utils/Cargo.toml index 8ed1c549..55efd4f9 100644 --- a/actix-utils/Cargo.toml +++ b/actix-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-utils" -version = "0.3.4" +version = "0.3.5" authors = ["Nikolay Kim "] description = "Actix utils - various actix net related services" keywords = ["network", "framework", "async", "futures"] diff --git a/actix-utils/src/cloneable.rs b/actix-utils/src/cloneable.rs index 933e6a1f..1b2d2578 100644 --- a/actix-utils/src/cloneable.rs +++ b/actix-utils/src/cloneable.rs @@ -7,12 +7,12 @@ use futures::Poll; use super::cell::Cell; /// Service that allows to turn non-clone service to a service with `Clone` impl -pub struct CloneableService { +pub struct CloneableService { service: Cell, _t: PhantomData>, } -impl CloneableService { +impl CloneableService { pub fn new(service: T) -> Self where T: Service, @@ -24,7 +24,7 @@ impl CloneableService { } } -impl Clone for CloneableService { +impl Clone for CloneableService { fn clone(&self) -> Self { Self { service: self.service.clone(), @@ -35,7 +35,7 @@ impl Clone for CloneableService { impl Service for CloneableService where - T: Service + 'static, + T: Service, { type Request = T::Request; type Response = T::Response;