diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-02-14 11:47:00 -0800 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-02-14 14:44:12 -0800 |
| commit | 9143688197ee1ba14e224badbe1402b36111e592 (patch) | |
| tree | 44b298c748b863da2c2c855733f1b2d58075fa9b /src/libstd/cmp.rs | |
| parent | 8ec6f43d6c58588576743f5adb28b78dbc3bb057 (diff) | |
| download | rust-9143688197ee1ba14e224badbe1402b36111e592.tar.gz rust-9143688197ee1ba14e224badbe1402b36111e592.zip | |
librustc: Replace `impl Type : Trait` with `impl Trait for Type`. rs=implflipping
Diffstat (limited to 'src/libstd/cmp.rs')
| -rw-r--r-- | src/libstd/cmp.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/cmp.rs b/src/libstd/cmp.rs index 991953cccb7..a73b5f2a706 100644 --- a/src/libstd/cmp.rs +++ b/src/libstd/cmp.rs @@ -21,7 +21,7 @@ pub trait FuzzyEq<Eps> { pure fn fuzzy_eq_eps(&self, other: &Self, epsilon: &Eps) -> bool; } -impl float: FuzzyEq<float> { +impl FuzzyEq<float> for float { pure fn fuzzy_eq(&self, other: &float) -> bool { self.fuzzy_eq_eps(other, &FUZZY_EPSILON) } @@ -31,7 +31,7 @@ impl float: FuzzyEq<float> { } } -impl f32: FuzzyEq<f32> { +impl FuzzyEq<f32> for f32 { pure fn fuzzy_eq(&self, other: &f32) -> bool { self.fuzzy_eq_eps(other, &(FUZZY_EPSILON as f32)) } @@ -41,7 +41,7 @@ impl f32: FuzzyEq<f32> { } } -impl f64: FuzzyEq<f64> { +impl FuzzyEq<f64> for f64 { pure fn fuzzy_eq(&self, other: &f64) -> bool { self.fuzzy_eq_eps(other, &(FUZZY_EPSILON as f64)) } @@ -70,7 +70,7 @@ mod test_complex{ struct Complex { r: float, i: float } - impl Complex: FuzzyEq<float> { + impl FuzzyEq<float> for Complex { pure fn fuzzy_eq(&self, other: &Complex) -> bool { self.fuzzy_eq_eps(other, &FUZZY_EPSILON) } |
