Is it possible to use `Iterator::map` in a ToSocketAddrs impl? (associated types involving closures)

· Users Rust Lang · Nov. 4, 2026, 2:21 a.m.
Summary
The post discusses the challenges of using `Iterator::map` in the implementation of `ToSocketAddrs` for a custom type `PortRange`, specifically focusing on the need to provide a proper type for the closure in the associated type definition, as well as the compilation errors encountered.