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

kaidokert / fixed-bigint-rs / 28763636231
97%
main: 97%

Build:
Build:
LAST BUILD BRANCH: v0.4.1
DEFAULT BRANCH: main
Ran 06 Jul 2026 02:19AM UTC
Jobs 1
Files 30
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 Jul 2026 02:18AM UTC coverage: 97.47% (-0.1%) from 97.604%
28763636231

Pull #134

github

kaidokert
Address PR #134 review: zero-init BytesHolder, dedupe FromByteSlice length check

- `holder_be` / `holder_le` initialise via `BytesHolder::default()`
  (which zero-fills through the existing `ConstZero::ZERO` Default
  impl) instead of `BytesHolder::from_array(self.array)`. On the
  `&FixedUInt: ToBytes` path — the whole reason that impl exists —
  the old form read `self.array` through the reference and
  materialised a Copy of the secret limb array on the stack as the
  argument to `from_array`, then immediately overwrote it with the
  serialised bytes. That intermediate defeats the "no unwrapped
  secret on the stack" contract. Zero-init writes serialised bytes
  through the reference directly. Also drops a wasted Copy on the
  owned path.

  (gemini-code-assist inline finding, to_from_bytes.rs:197.)

- `FromByteSlice::from_be_slice` / `from_le_slice` route their
  empty + overflow length check through a shared crate-private
  `Self::check_slice_len` helper. Six lines to four, and future
  length-invariant changes only need to land in one place.

  (sourcery-ai general finding #2.)

sourcery-ai's general finding #1 — the stable and nightly
`ToBytes for &FixedUInt` impls take different code paths — is
declined for now. Stable uses `BytesHolder<T, N>` (unsafe
`from_raw_parts` reinterpretation over the limb storage) as the
associated type; nightly uses `ConstBytesHolder<{ byte_len::<T,N>() }>`
with a byte-by-byte const-eval-friendly loop. The two `Bytes`
associated types are structurally different — unifying would
require a shared abstraction that both variants can hit, more
churn than the divergence is worth on this hop. Revisit alongside
capability (c) in a follow-up.
Pull Request #134: Byte-trait alignment step 2: FromByteSlice + &FixedUInt: ToBytes

62 of 68 new or added lines in 2 files covered. (91.18%)

3197 of 3280 relevant lines covered (97.47%)

302.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
80.99
-3.57% src/fixeduint/to_from_bytes.rs
Jobs
ID Job ID Ran Files Coverage
1 28763636231.1 06 Jul 2026 02:19AM UTC 30
97.47
GitHub Action Run
Source Files on build 28763636231
  • Tree
  • List 30
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28763636231
  • Pull Request #134
  • PR Base - main (#28753069087)
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