mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-30 21:04:35 +01:00
remove unneeded static
This commit is contained in:
parent
629ed05f82
commit
810fa869ae
@ -1,9 +1,16 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
|
||||||
|
## [0.3.5] - 2019-04-04
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
* Allow to send messages to `FramedTransport` via mpsc channel.
|
* Allow to send messages to `FramedTransport` via mpsc channel.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
* Remove 'static constraint from Clonable service
|
||||||
|
|
||||||
|
|
||||||
## [0.3.4] - 2019-03-12
|
## [0.3.4] - 2019-03-12
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-utils"
|
name = "actix-utils"
|
||||||
version = "0.3.4"
|
version = "0.3.5"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Actix utils - various actix net related services"
|
description = "Actix utils - various actix net related services"
|
||||||
keywords = ["network", "framework", "async", "futures"]
|
keywords = ["network", "framework", "async", "futures"]
|
||||||
|
@ -7,12 +7,12 @@ use futures::Poll;
|
|||||||
use super::cell::Cell;
|
use super::cell::Cell;
|
||||||
|
|
||||||
/// Service that allows to turn non-clone service to a service with `Clone` impl
|
/// Service that allows to turn non-clone service to a service with `Clone` impl
|
||||||
pub struct CloneableService<T: 'static> {
|
pub struct CloneableService<T> {
|
||||||
service: Cell<T>,
|
service: Cell<T>,
|
||||||
_t: PhantomData<Rc<()>>,
|
_t: PhantomData<Rc<()>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: 'static> CloneableService<T> {
|
impl<T> CloneableService<T> {
|
||||||
pub fn new(service: T) -> Self
|
pub fn new(service: T) -> Self
|
||||||
where
|
where
|
||||||
T: Service,
|
T: Service,
|
||||||
@ -24,7 +24,7 @@ impl<T: 'static> CloneableService<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: 'static> Clone for CloneableService<T> {
|
impl<T> Clone for CloneableService<T> {
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
Self {
|
Self {
|
||||||
service: self.service.clone(),
|
service: self.service.clone(),
|
||||||
@ -35,7 +35,7 @@ impl<T: 'static> Clone for CloneableService<T> {
|
|||||||
|
|
||||||
impl<T> Service for CloneableService<T>
|
impl<T> Service for CloneableService<T>
|
||||||
where
|
where
|
||||||
T: Service + 'static,
|
T: Service,
|
||||||
{
|
{
|
||||||
type Request = T::Request;
|
type Request = T::Request;
|
||||||
type Response = T::Response;
|
type Response = T::Response;
|
||||||
|
Loading…
Reference in New Issue
Block a user