Created
January 28, 2013 22:09
-
-
Save Kimundi/4659639 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
| trait ConvTo<T> { | |
| fn to(&self) -> T; | |
| } | |
| impl i8: ConvTo<u8> { | |
| fn to(&self) -> u8 { *self as u8 } | |
| } | |
| impl i8: ConvTo<u16> { | |
| fn to(&self) -> u16 { *self as u16 } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment