bors 75df685d28 Auto merge of #36766 - nnethercote:hash-span-capacity, r=bluss
Clarify HashMap's capacity handling.

HashMap has two notions of "capacity":

- "Usable capacity": the number of elements a hash map can hold without
  resizing. This is the meaning of "capacity" used in HashMap's API,
  e.g. the `with_capacity()` function.

- "Internal capacity": the number of allocated slots. Except for the
  zero case, it is always larger than the usable capacity (because some
  slots must be left empty) and is always a power of two.

HashMap's code is confusing because it does a poor job of
distinguishing these two meanings. I propose using two different terms
for these two concepts. Because "capacity" is already used in HashMap's
API to mean "usable capacity", I will use a different word for "internal
capacity". I propose "span", though I'm happy to consider other names.
2016-10-03 04:25:58 -07:00
..
2016-08-24 22:12:48 +00:00
2016-09-30 14:02:45 -07:00
2016-08-24 22:12:48 +00:00
2016-08-29 17:34:02 +02:00
2016-09-28 23:17:56 +00:00
2016-08-24 22:12:48 +00:00
2016-09-11 12:36:24 -07:00