What is Nostr?
Garrett :spinning_pinwheel: /
npub1hw3…rd5a
2024-03-10 17:11:17

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
Author Public Key
npub1hw3zcgvumcd5hjg4p3e5j3dgmnd8muz40hey5llp3hpp9my00t4qwmrd5a