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

moonbitlang / core / 4316
94%

Build:
DEFAULT BRANCH: main
Ran 13 May 2026 03:12AM UTC
Jobs 1
Files 365
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

13 May 2026 03:11AM UTC coverage: 94.267% (-0.003%) from 94.27%
4316

push

github

web-flow
refactor: declarative comprehension across all Debug impls (#3545)

Sweep the remaining `to_array().map(...)` two-pass pattern in 8 Debug
impls and replace with a single-pass array comprehension:

- sorted_set/debug.mbt           (SortedSet)
- priority_queue/debug.mbt       (PriorityQueue)
- hashset/debug.mbt              (HashSet)
- immut/sorted_set/debug.mbt     (immut SortedSet)
- sorted_map/debug.mbt           (SortedMap, key-value)
- hashmap/debug.mbt              (HashMap, key-value)
- immut/hashmap/debug.mbt        (immut HashMap, key-value)
- debug/debug.mbt                (Map, key-value, also drops a let-binding lambda)

```diff
- let xs : Array[Repr] = self.to_array().map(x => @debug.to_repr(x))
- Repr::opaque_("Foo", Repr::array(xs))
+ Repr::opaque_("Foo", Repr::array([for x in self => @debug.to_repr(x)]))
```

For map-shaped impls the loop also destructures `(k, v)` directly:

```diff
- self.to_array().map(kv => (to_repr(kv.0), to_repr(kv.1)))
+ [for k, v in self => (to_repr(k), to_repr(v))]
```

Drops one intermediate `Array` allocation per `to_repr` call. None of
these sit on a hot path — they're called from `@debug.to_repr` /
`debug_inspect`. Companion to the earlier sweep in #3529 that covered
queue and immut/hashset.

Semantics-preserving: full `moon test` (6425/6425) passes and
`moon info` produces no `.mbti` change.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

11 of 11 new or added lines in 8 files covered. (100.0%)

14798 of 15698 relevant lines covered (94.27%)

218762.9 hits per line

Jobs
ID Job ID Ran Files Coverage
1 4316.1 13 May 2026 03:12AM UTC 366
94.28
GitHub Action Run
Source Files on build 4316
  • Tree
  • List 365
  • Changed 8
  • Source Changed 8
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 557da408 on github
  • Prev Build on main (#4314)
  • Next Build on main (#4320)
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