Last active
August 29, 2015 14:11
-
-
Save zmack/52357e63459840f8da72 to your computer and use it in GitHub Desktop.
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
impl Operation for Bar { | |
fn add(&self, other: int) { | |
} | |
} | |
impl OtherOperation for Bar { | |
fn zero(&self) -> uint { | |
0 | |
} | |
} | |
pub trait Operation { | |
fn zero(&self) -> uint; | |
fn add(&self, other: int); | |
} | |
pub trait OtherOperation: Operation { | |
fn one(&self) -> uint { | |
self.zero() + 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment