Created
September 27, 2020 11:22
-
-
Save zerosign/4692b201ca8e26f8e642a462c6f4535f to your computer and use it in GitHub Desktop.
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
// rust rmsbolt starter file | |
// Local Variables: | |
// rmsbolt-command: "rustc -C opt-level=0" | |
// rmsbolt-disassemble: nil | |
// End: | |
fn is_rms(a: char) -> i32 { | |
match a { | |
'R' => 1, | |
'M' => 2, | |
'S' => 3, | |
_ => 0, | |
} | |
} | |
fn main() { | |
let a: u8 = 1 + 1; | |
if is_rms(a as char) != 0 { | |
println!("{}", a); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment