I have seen Vec<_>
a couple of times already. For example:
let a = "line1
line2
line3";
println!("{:?}", a.lines().collect::<Vec<_>>());
But what does that 'uncertain face' <_>
mean?
I'm used to a typename in angle brackets, but what type can that be?
The only meaning of underscore that I'm aware of is from Python as a name for an unused variable.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…