about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-10-08 23:23:08 +0200
committerGitHub <noreply@github.com>2020-10-08 23:23:08 +0200
commit738a41b363c27942944705fab16094704bab4e7d (patch)
tree06f9a77251e54d2052ec9755208a5b625cf731f4 /src/test/codegen/src-hash-algorithm
parent2766b725d3aabee4788943d25b60413b34db570b (diff)
parent3b051d0171b4e15aff4d2ecacf7659f7278e8e09 (diff)
downloadrust-738a41b363c27942944705fab16094704bab4e7d.tar.gz
rust-738a41b363c27942944705fab16094704bab4e7d.zip
Rollup merge of #77449 - ssomers:btree_drain_filter_size_hint, r=Mark-Simulacrum
BTreeMap: comment why drain_filter's size_hint is somewhat pessimistic

The `size_hint` of the `DrainFilter` iterator doesn't adjust as you iterate. This hardly seems important to me, but there has been a comparable PR #64383 in the past. I guess a scenario is that you first iterate half the map manually and keep most of the key/value pairs in the map, and then tell the predicate to drain most of the key/value pairs and `.collect` the iterator over the remaining half of the map.

I am totally ambivalent whether this is better or not.

r? @Mark-Simulacrum
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions