Created
November 28, 2018 09:00
-
-
Save rust-play/0831b83b5706f2dcc68c60ab9c1e43d7 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains 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
#[repr(u16)] | |
pub enum MyEnum { | |
First = 11, | |
Unknown = 0, | |
} | |
pub fn main() { | |
println!("{}", MyEnum::First as u16); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment