]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/static-methods-in-traits.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / static-methods-in-traits.rs
index d171434aa482de85c0cffdbbefea1df12e90bcb9..180cd115c96e8503002aae46475672494d1d94f5 100644 (file)
@@ -9,27 +9,26 @@
 // except according to those terms.
 
 mod a {
-       pub trait Foo {
-               pub fn foo() -> Self;
-       }
+    pub trait Foo {
+        fn foo() -> Self;
+    }
 
-       impl Foo for int {
-               pub fn foo() -> int {
-                       3
-               }
-       }
-       
-       impl Foo for uint {
-               pub fn foo() -> uint {
-                       5u
-               }
-       }
+    impl Foo for int {
+        fn foo() -> int {
+            3
+        }
+    }
+
+    impl Foo for uint {
+        fn foo() -> uint {
+            5u
+        }
+    }
 }
 
 pub fn main() {
-       let x: int = a::Foo::foo();
-       let y: uint = a::Foo::foo();
-       assert!(x == 3);
-       assert!(y == 5);
+    let x: int = a::Foo::foo();
+    let y: uint = a::Foo::foo();
+    assert_eq!(x, 3);
+    assert_eq!(y, 5);
 }
-