rustc: Add an "ne" method to the Eq trait, and implement it everywhere
This commit is contained in:
parent
ac1f84c153
commit
feb014eb3c
76 changed files with 218 additions and 60 deletions
|
@ -780,6 +780,8 @@ impl &str: Eq {
|
|||
pure fn eq(&&other: &str) -> bool {
|
||||
eq_slice(self, other)
|
||||
}
|
||||
#[inline(always)]
|
||||
pure fn ne(&&other: &str) -> bool { !self.eq(other) }
|
||||
}
|
||||
|
||||
impl ~str: Eq {
|
||||
|
@ -787,6 +789,8 @@ impl ~str: Eq {
|
|||
pure fn eq(&&other: ~str) -> bool {
|
||||
eq_slice(self, other)
|
||||
}
|
||||
#[inline(always)]
|
||||
pure fn ne(&&other: ~str) -> bool { !self.eq(other) }
|
||||
}
|
||||
|
||||
impl @str: Eq {
|
||||
|
@ -794,6 +798,8 @@ impl @str: Eq {
|
|||
pure fn eq(&&other: @str) -> bool {
|
||||
eq_slice(self, other)
|
||||
}
|
||||
#[inline(always)]
|
||||
pure fn ne(&&other: @str) -> bool { !self.eq(other) }
|
||||
}
|
||||
|
||||
impl ~str : Ord {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue