Created
May 29, 2015 23:09
-
-
Save Wilfred/084ed9276a84a4999375 to your computer and use it in GitHub Desktop.
Adding methods to Iterator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Greet { | |
fn say_hello(&self) -> (); | |
} | |
impl Greet for Iterator { | |
fn say_hello(&self) { | |
println!("hello from an iterator!"); | |
} | |
} |
Author
Wilfred
commented
May 29, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment