-
-
Save RandyMcMillan/498ea4697e78c5a296ebc759c55e2246 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains hidden or 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
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