• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moonbitlang / core / 7985
88%

Build:
DEFAULT BRANCH: main
Ran 06 Nov 2026 09:34AM UTC
Jobs 1
Files 686
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Nov 2026 09:31AM UTC coverage: 88.475% (-0.002%) from 88.477%
7985

push

github

web-flow
refactor!: deprecate capacity() on Map, HashMap, HashSet and Set (#4761)

* refactor!: deprecate capacity() on Map, HashMap, HashSet and Set

`capacity()` returned the internal bucket count, while the constructors'
`capacity` hint counts entries (Map today; HashMap/HashSet/Set as of the hint
fix). None of these types has `reserve` or `shrink_to_fit`, so the getter
could only expose an implementation detail and pin the load factor. Follow
Go's map design instead: the constructor hint is the only sizing control.

The getters move to each package's `deprecated.mbt` with no replacement.
Tests that observed growth through `capacity()` move to `capacity_wbtest.mbt`
and read the private field; setup sanity checks and cross-package sizing
assertions that can no longer observe buckets are dropped. READMEs now show
the `capacity` hint instead of the getter.

Part of #4636.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: add license headers to new whitebox tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: don't promise entry-count sizing for HashMap/HashSet/Set hints

On main only builtin Map treats the `capacity` hint as an entry count, so
the README and deprecation text for the other three must not promise that
filling to the hint avoids rehashing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

25249 of 28538 relevant lines covered (88.48%)

418348.5 hits per line

Jobs
ID Job ID Ran Files Coverage
1 7985.1 06 Nov 2026 09:34AM UTC 686
88.48
GitHub Action Run
Source Files on build 7985
  • Tree
  • List 686
  • Changed 9
  • Source Changed 9
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • dbe126c6 on github
  • Prev Build on main (#7980)
  • Next Build on main (#7990)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc