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

unicode-org / icu4x / 15828642813 / 1
73%
main: 73%

Build:
DEFAULT BRANCH: main
Ran 23 Jun 2025 03:47PM UTC
Files 981
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

23 Jun 2025 03:35PM UTC coverage: 72.592%. Remained the same
15828642813.1

push

github

web-flow
Add explicit defaults to FFI enums where clear-cut. (#6692)

This PR does a couple things.

 - Adds `#[default]` to Rust-side enums where unambiguous (e.g. "Auto")
- Adds `#[diplomat::attr(default)]` to Diplomat-side enums where Rust
has a default
- Adds `#[diplomat::attr(default)]` to *non option* Diplomat-side enums
where there is a somewhat sensible default, documenting the reason. In
the case of returned enums an explicit default is still nice for
stability, and there's no downside of lack of explicitness since our
APIs are not accepting them anyway.
- Adds `#[diplomat::attr(default)]` to CalendarKind::Iso and
TimeZoneVariant since having that default be potentially unstable is a
bigger deal than other defaults.


If a default has been added in FFI without a corresponding comment that
means the Rust type has the same default.

A lot of FFI things still do not have an explicit default: I'm
considering "explicit default" to mean that it is a commitment to that
default only changing with intention. Most property enums do not have
one, but they all have a 0 variant which is unlikely to change. A fair
number of our options do not have a default either.

Note that the C++ backend will currently generate a default for every
enum (picking, in order: explicit default, 0 variant, or first variant)
because deferred initialization is a UB risk without it. Us setting
these defaults just provides some stability.

<!--
Thank you for your pull request to ICU4X!

Reminder: try to use [Conventional
Comments](https://conventionalcomments.org/) to make comments clearer.

Please see
https://github.com/unicode-org/icu4x/blob/main/CONTRIBUTING.md for
general
information on contributing to ICU4X.
-->

---------

Co-authored-by: Robert Bastian <4706271+robertbastian@users.noreply.github.com>

58966 of 81229 relevant lines covered (72.59%)

460689.97 hits per line

Source Files on job 15828642813.1
  • Tree
  • List 981
  • Changed 22
  • Source Changed 19
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 15828642813
  • 464b4032 on github
  • Prev Job for on main (#15827801987.1)
  • Next Job for on main (#15846947309.1)
  • Delete
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