References to numbers
- TODO
fn main() {
let x = 2;
let y = &2;
println!("{}", x);
println!("{}", y);
println!("{}", &x == y);
assert_eq!(&x, y);
}
2
2
true
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
fn main() {
let x = 2;
let y = &2;
println!("{}", x);
println!("{}", y);
println!("{}", &x == y);
assert_eq!(&x, y);
}
2
2
true