Guest User

Untitled

a guest
May 27th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. pub struct TestStruct {
  2. pub enumvalue: TestEnum,
  3. }
  4.  
  5. pub enum TestEnum {
  6. Val1,
  7. Val2
  8. }
  9.  
  10. pub static mut TEST : TestStruct = TestStruct {
  11. enumvalue: TestEnum::Val1,
  12. };
  13.  
  14. fn main() {
  15. unsafe {
  16. println!("{}", TEST.enumvalue);
  17. }
  18. }
Add Comment
Please, Sign In to add comment