News for hackers. Stuff that matters.
Re:Apt Rust requirement raises questions by gpm on Tuesday November 25, 2025 @01:10PM (#46048737)
Nah, there's lots of times you need to specify the types of Vec, either because

1. You don't want the default `i32` integer type and this is just a temporary vector of integers.

2. Rust's type inference is not perfect and sometimes the compiler will object even though there's only one type that could possibly work.

Edit: The <Vec<T>>::new() syntax is definitely never used though.

Re:Apt Rust requirement raises questions by ViewTrick1002 on Tuesday November 25, 2025 @04:09PM (#46050814)
Or just collect::<Vec<_>>() when you have up doing everything in a lazy pattern and want a concrete type again.

Which I guess i typical stumbling block when the compiler can’t infer what type to collect into.