fn largest(list: &[i32]) -> i32 {
let mut largest = list[0];
for &item in list {
if item > largest {
largest = item;
}
}
largest
}
Third row, the "item" type here is &i32, why does the type change to i32 after using the reference symbol, instead of &&i32 as expected?Shouldn't you use [*] for dereferencing?