Skip to content

Commit

Permalink
Now inline default 'ne' methods
Browse files Browse the repository at this point in the history
  • Loading branch information
eamartin committed Aug 31, 2013
1 parent babe20f commit ed2217d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libstd/cmp.rs
Expand Up @@ -36,6 +36,8 @@ and `Eq` to overload the `==` and `!=` operators.
#[lang="eq"]
pub trait Eq {
fn eq(&self, other: &Self) -> bool;

#[inline]
fn ne(&self, other: &Self) -> bool { !self.eq(other) }
}

Expand Down

0 comments on commit ed2217d

Please sign in to comment.