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

unicode-org / icu4x / 13777714760

11 Mar 2025 12:37AM UTC coverage: 75.063% (-0.03%) from 75.088%
13777714760

push

github

web-flow
OPTION B: Add format_unchecked functions to DateTimeFormatter via DateTimeInputUnchecked (#6256)

Toward https://github.com/unicode-org/icu4x/issues/5940

Alternative to #6255

In hindsight, this is a pretty obviously useful function. It took some
experimentation until I arrived at it. I have two signatures: this one
and the one in #6255. Please express an opinion on which one to move
forward with.

How this approach works: it adds a single plain input type named
`DateTimeInputUnchecked`. This type cannot be passed into `format`
because it can't implement the required traits, so it gets its own
format function with fallible behavior.

Pros and cons:

- Pro: No weird trait bounds on this function
- Pro: Can construct this type manually without having to implement
ICU4X traits or go through ICU4X input types
- Con: Adds a new struct type to the API that we need to bikeshed (where
does it live, what is it named, what are its fields named, ...)

10 of 41 new or added lines in 4 files covered. (24.39%)

4 existing lines in 3 files now uncovered.

57976 of 77236 relevant lines covered (75.06%)

820686.07 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

89.95
/components/datetime/src/pattern/formatter.rs


Source Not Available

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