Garrett :spinning_pinwheel: on Nostr: m.values().filter(|p| **p == v).count() This feels…wrong. values() returns an ...
m.values().filter(|p| **p == v).count()
This feels…wrong.
values() returns an iterator of references. Why does filter() reference each reference? Is the ** conventional is this kind of situation, or is there a better way to do this?
#rust
This feels…wrong.
values() returns an iterator of references. Why does filter() reference each reference? Is the ** conventional is this kind of situation, or is there a better way to do this?
#rust