Hacker News new | past | comments | ask | show | jobs | submit login

That's what I thought too, but I fixed some compiler errors by turning a closure into an inner function. Probably a PBKAC, but...



Perhaps it's due to the fact that you can't really have type-generic closures in Rust: once the compiler has inferred one type, the closure cannot be used with another type. In contrast, inner functions can have any number of additional type parameters.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: