Warning
This post was published 54 days ago. The information described in this article may have changed.
In this code:
fn main() {
let a: Vec<i32> = vec![1,2,3];
let b: &i32 = &a[2];
println!("{a:?}, {b}");
}
Should I think of b
as path number 2 in the image below, or paths number 1a and 1b (although in this case I'm unsure how it directs to 1b
unless it remembers the offset, somehow ?
If you want to edit the image maybe this can be forked from the source.
5 posts - 2 participants
🏷️ rust_feed