Skip to content

Instantly share code, notes, and snippets.

@RandyMcMillan
Forked from rust-play/playground.rs
Created January 13, 2025 21:36
Show Gist options
  • Save RandyMcMillan/498ea4697e78c5a296ebc759c55e2246 to your computer and use it in GitHub Desktop.
Save RandyMcMillan/498ea4697e78c5a296ebc759c55e2246 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