std: Remove Zero impl for Option
Options are not numeric types, so it doesn't make sense for them to implement Zero.
This commit is contained in:
parent
43aba856b4
commit
f107718a9b
@ -483,11 +483,6 @@ impl<T:Zero> Option<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> Zero for Option<T> {
|
|
||||||
fn zero() -> Option<T> { None }
|
|
||||||
fn is_zero(&self) -> bool { self.is_none() }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// An iterator that yields either one or zero elements
|
/// An iterator that yields either one or zero elements
|
||||||
#[deriving(Clone, DeepClone)]
|
#[deriving(Clone, DeepClone)]
|
||||||
pub struct OptionIterator<A> {
|
pub struct OptionIterator<A> {
|
||||||
|
@ -24,7 +24,6 @@ struct E { a: int, b: int }
|
|||||||
|
|
||||||
#[deriving(Zero)]
|
#[deriving(Zero)]
|
||||||
struct Lots {
|
struct Lots {
|
||||||
c: Option<util::NonCopyable>,
|
|
||||||
d: u8,
|
d: u8,
|
||||||
e: char,
|
e: char,
|
||||||
f: float,
|
f: float,
|
||||||
|
Loading…
Reference in New Issue
Block a user