diwakergupta / stacks-blockchain-tob-audit

GNU General Public License v3.0
0 stars 0 forks source link

Manual copying from an iterator to a vector can be simplified #34

Open bradlarsen opened 3 years ago

bradlarsen commented 3 years ago

In the DNS resolver implementation, there is this resolve function:

https://github.com/trailofbits/x-audit-blockstack-core/blob/48546daf71e29a36f04f403b2ffd9548b1921d51/src/net/dns.rs#L152-L177

Here, the Ok(iter) branch of the match on lines 161-167 could be written as simply Ok(iter) => { iter.collect() }.