Hey new to Rust and the concept of borrowing. So it says only one mutable reference is allowed. Why does the following work, aren't those two references? Glad for your help, annotated how i think it works.
fn f1( p1: &mut [i32]){
//changing the content of the variable received by its SECOND mutable reference
p1[1]=3;
}
fn f2( mut x: &mut [i32]){
//creating another mutable reference to the variable
f1(&mut x);
f1(&mut x);
}
fn main() {
//create mutable variable
let mut a :[i32;5]= [1, 2, 3, 4, 5];
//pass mutable reference into function
f2(&mut a);
println!("{}",a[1]);
}