Rust why does an iterator of `ToString` items requires them to be `Display` also
The following code: enum MyEnum { A, B, } impl ToString for MyEnum { fn to_string(&self) -> String { match *self { Self::A => format!("A"), Self::B => format!("B"), } } } pub fn foo<I: ToString>(item: I) { println!("item: {}", item.to_string()); } pub fn bar<I: ToString>(iter: impl Iterator<Item = I>) { iter.for_each(|item| println!("item: {}", item.to_string())) }… Read More Rust why does an iterator of `ToString` items requires them to be `Display` also