Same person as @Gobbel2000@feddit.de, different instance.
Rust @programming.dev Supply chain attack on arrayref
- JumpDeleted
Permanently Deleted
Technology @beehaw.org How Big Tech Killed Online Debate
Linux @programming.dev The EU wants to cut funding for Free Software. Tell them why they should reconsider.
Opensource @programming.dev The EU wants to cut funding for Free Software. Tell them why they should reconsider.


You would have to either mutate the original vector or clone it, yes. If you really want to iterate through an immutable Vec with only constant memory usage, then you probably can't get around O(n^2) runtime, but maybe there is some time-memory-tradeoff where a small memory usage can get some time reduction.