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

moonbitlang / core / 4904
91%

Build:
DEFAULT BRANCH: main
Ran 30 Jun 2026 11:33AM UTC
Jobs 1
Files 382
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

30 Jun 2026 11:32AM UTC coverage: 91.314% (+0.001%) from 91.313%
4904

push

github

bobzhang
feat(immut/hashset): add HashSet constructor, deprecate from_array

The immutable `HashSet` was a positional newtype `struct HashSet(Node?)`,
whose tuple constructor reserved the `HashSet` name, so a `HashSet::HashSet`
function could not be defined.

Give the field a name instead:

    struct HashSet[A] { data : Node[A]? }

This frees the `HashSet` identifier (named structs construct via `{ data: ..}`,
not `HashSet(..)`) while keeping the exact same `Node?` representation, so the
internal logic is unchanged apart from `self.0` -> `self.data` and wrapping
results in `{ data: .. }`. The public type stays abstract (the field is
private), so its `.mbti` is unchanged apart from the new constructor.

Add `HashSet::HashSet(ArrayView[A]) -> HashSet[A]` so a set can be built with
`@hashset.HashSet([...])`, deprecate the old `from_array` (and its `of` alias)
in favour of it, and migrate all usages across the package. The `Show`/`output`
format string and its snapshot tests intentionally keep emitting
`@immut/hashset.from_array([...])`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

28 of 28 new or added lines in 1 file covered. (100.0%)

6 existing lines in 3 files now uncovered.

15339 of 16798 relevant lines covered (91.31%)

187712.6 hits per line

Coverage Regressions

Lines Coverage ∆ File
3
98.79
0.0% builtin/arrayview.mbt
2
98.97
0.0% builtin/stringview.mbt
1
98.33
0.0% builtin/mutarrayview.mbt
Jobs
ID Job ID Ran Files Coverage
1 4904.1 30 Jun 2026 11:33AM UTC 383
91.33
GitHub Action Run
Source Files on build 4904
  • Tree
  • List 382
  • Changed 7
  • Source Changed 7
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 95630dc4 on github
  • Prev Build on main (#4898)
  • Next Build on main (#4906)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc