0.10.2: Rust update for clone feature
This commit is contained in:
parent
6a2a404af7
commit
d04bde3509
2 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "anymap"
|
name = "anymap"
|
||||||
version = "0.10.1"
|
version = "0.10.2"
|
||||||
authors = ["Chris Morgan <me@chrismorgan.info>"]
|
authors = ["Chris Morgan <me@chrismorgan.info>"]
|
||||||
description = "A safe and convenient store for one value of each type"
|
description = "A safe and convenient store for one value of each type"
|
||||||
#documentation = "http://www.rust-ci.org/chris-morgan/anymap/doc/anymap/index.html"
|
#documentation = "http://www.rust-ci.org/chris-morgan/anymap/doc/anymap/index.html"
|
||||||
|
|
|
@ -6,7 +6,7 @@ pub trait CloneToAny {
|
||||||
fn clone_to_any(&self) -> Box<Any>;
|
fn clone_to_any(&self) -> Box<Any>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: 'static + Clone> CloneToAny for T {
|
impl<T: Any + Clone> CloneToAny for T {
|
||||||
fn clone_to_any(&self) -> Box<Any> {
|
fn clone_to_any(&self) -> Box<Any> {
|
||||||
Box::new(self.clone())
|
Box::new(self.clone())
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ impl<T: 'static + Clone> CloneToAny for T {
|
||||||
/// Pretty much just `std::any::Any + Clone`.
|
/// Pretty much just `std::any::Any + Clone`.
|
||||||
pub trait Any: ::std::any::Any + CloneToAny { }
|
pub trait Any: ::std::any::Any + CloneToAny { }
|
||||||
|
|
||||||
impl<T: 'static + Clone> Any for T { }
|
impl<T: ::std::any::Any + Clone> Any for T { }
|
||||||
|
|
||||||
impl Clone for Box<Any> {
|
impl Clone for Box<Any> {
|
||||||
fn clone(&self) -> Box<Any> {
|
fn clone(&self) -> Box<Any> {
|
||||||
|
|
Loading…
Add table
Reference in a new issue