Given type Foo and type Bar where Foo: Into<Bar>, I would like to have IntoIterator<Item = Foo> to implement Into<BTreeSet<Bar>>, so that I simplify this:
let set: BTreeSet<Bar> = btreeset! { "abc".into(), "def".into(), "ghi".into() };
into this:
let set: BTreeSet<Bar> = btreeset! { "abc", "def", "ghi" }.into();
This feature should be available for BTreeMap, HashSet, and HashMap too.
This currently isn't possible because it would overlap with the impl of From<T> for T. I think you'll have to make do with something like set.into_iter().map(Into::into).collect().