Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created May 5, 2018 22:46
Show Gist options
  • Save rust-play/96f4cefdda4f2539fef51e4508b386bd to your computer and use it in GitHub Desktop.
Save rust-play/96f4cefdda4f2539fef51e4508b386bd to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
fn main() {
let num1 = vec![2, 3];
let num2 = vec![2, 3];
let address1 = &num1 as *const Vec<i32>;
let address2 = &num2 as *const Vec<i32>;
let number1 = address1 as i32;
let number2 = address2 as i32;
println!("{}", number1 % 13);
println!("{}", number2 % 13);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment