Skip to content

Instantly share code, notes, and snippets.

@zerosign
Created September 27, 2020 11:22
Show Gist options
  • Save zerosign/4692b201ca8e26f8e642a462c6f4535f to your computer and use it in GitHub Desktop.
Save zerosign/4692b201ca8e26f8e642a462c6f4535f to your computer and use it in GitHub Desktop.
// 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