diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-05-24 01:16:15 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-05-24 01:16:15 -0400 |
| commit | 0629ef16e8d93e7e461b025e829b350b5daeed6a (patch) | |
| tree | 4e0547b93542bd93b4f1453728a58450f9957216 /src/libstd/option.rs | |
| parent | a776d65b4d8e5eaad501af2b147cfbe1dbf10d3c (diff) | |
use deriving for DeepClone
Diffstat (limited to 'src/libstd/option.rs')
| -rw-r--r-- | src/libstd/option.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/libstd/option.rs b/src/libstd/option.rs index bc1ffcdc81a..be6ec8c8518 100644 --- a/src/libstd/option.rs +++ b/src/libstd/option.rs @@ -54,21 +54,12 @@ use clone::DeepClone; #[cfg(test)] use str; /// The option type -#[deriving(Clone, Eq)] +#[deriving(Clone, DeepClone, Eq)] pub enum Option<T> { None, Some(T), } -impl<T: DeepClone> DeepClone for Option<T> { - fn deep_clone(&self) -> Option<T> { - match *self { - Some(ref x) => Some(x.deep_clone()), - None => None - } - } -} - impl<T:Ord> Ord for Option<T> { fn lt(&self, other: &Option<T>) -> bool { match (self, other) { |
