Itertools kmerge adding reference layer?
⚓ Rust 📅 2026-05-02 👤 surdeus 👁️ 3I presume I am doing soemthing wrong.
I construct a Vec<Vec> and make sure MyStruct supports PartialOrd.
I then call itertools kmerge with the intention of creating Vec with the entries sorted by the PartialOrd. But the compiler tells me that what kmerge produces if Vec<&MyStruct>.
I presume I am missing something obvious?
(I tried creating Vec<<Vec<&MyStruct>> but then the compiler told me kmerge was producing Vec<&&MyStruct>.)
Thanks,
Joel
4 posts - 2 participants
🏷️ Rust_feed