core: derive Clone for core types
This commit is contained in:
parent
28efc234f4
commit
2b83defa4a
@ -231,6 +231,7 @@ pub mod rt;
|
||||
// can be resolved within libcore.
|
||||
#[doc(hidden)]
|
||||
pub mod core {
|
||||
pub use clone;
|
||||
pub use cmp;
|
||||
pub use condition;
|
||||
pub use option;
|
||||
|
@ -17,7 +17,7 @@ use result;
|
||||
use vec;
|
||||
|
||||
/// The either type
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Clone, Eq)]
|
||||
pub enum Either<T, U> {
|
||||
Left(T),
|
||||
Right(U)
|
||||
|
@ -52,7 +52,7 @@ use iter::{BaseIter, MutableIter};
|
||||
#[cfg(test)] use str;
|
||||
|
||||
/// The option type
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Clone, Eq)]
|
||||
pub enum Option<T> {
|
||||
None,
|
||||
Some(T),
|
||||
|
@ -20,7 +20,7 @@ use option::{None, Option, Some};
|
||||
use str;
|
||||
use to_str::ToStr;
|
||||
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Clone, Eq)]
|
||||
pub struct WindowsPath {
|
||||
host: Option<~str>,
|
||||
device: Option<~str>,
|
||||
@ -32,7 +32,7 @@ pub fn WindowsPath(s: &str) -> WindowsPath {
|
||||
GenericPath::from_str(s)
|
||||
}
|
||||
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Clone, Eq)]
|
||||
pub struct PosixPath {
|
||||
is_absolute: bool,
|
||||
components: ~[~str],
|
||||
|
@ -20,7 +20,7 @@ use option::{None, Option, Some};
|
||||
use vec;
|
||||
|
||||
/// The result type
|
||||
#[deriving(Eq)]
|
||||
#[deriving(Clone, Eq)]
|
||||
pub enum Result<T, U> {
|
||||
/// Contains the successful result value
|
||||
Ok(T),
|
||||
|
Loading…
x
Reference in New Issue
Block a user