Remove 'static bounds on P.
These date back to 2014. I don't think they're needed any more.
This commit is contained in:
@@ -32,11 +32,11 @@ pub struct P<T: ?Sized> {
|
|||||||
|
|
||||||
/// Construct a `P<T>` from a `T` value.
|
/// Construct a `P<T>` from a `T` value.
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
pub fn P<T: 'static>(value: T) -> P<T> {
|
pub fn P<T>(value: T) -> P<T> {
|
||||||
P { ptr: Box::new(value) }
|
P { ptr: Box::new(value) }
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: 'static> P<T> {
|
impl<T> P<T> {
|
||||||
/// Move out of the pointer.
|
/// Move out of the pointer.
|
||||||
/// Intended for chaining transformations not covered by `map`.
|
/// Intended for chaining transformations not covered by `map`.
|
||||||
pub fn and_then<U, F>(self, f: F) -> U
|
pub fn and_then<U, F>(self, f: F) -> U
|
||||||
@@ -86,7 +86,7 @@ impl<T: ?Sized> DerefMut for P<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: 'static + Clone> Clone for P<T> {
|
impl<T: Clone> Clone for P<T> {
|
||||||
fn clone(&self) -> P<T> {
|
fn clone(&self) -> P<T> {
|
||||||
P((**self).clone())
|
P((**self).clone())
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ impl<T> fmt::Pointer for P<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<D: Decoder, T: 'static + Decodable<D>> Decodable<D> for P<T> {
|
impl<D: Decoder, T: Decodable<D>> Decodable<D> for P<T> {
|
||||||
fn decode(d: &mut D) -> P<T> {
|
fn decode(d: &mut D) -> P<T> {
|
||||||
P(Decodable::decode(d))
|
P(Decodable::decode(d))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user