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:
Erick Tryzelaar 2013-09-11 22:19:19 -07:00
parent 43aba856b4
commit f107718a9b
2 changed files with 0 additions and 6 deletions

View File

@ -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> {

View File

@ -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,