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

lpenz / copstr / 27512980626
76%
main: 76%

Build:
Build:
LAST BUILD BRANCH: devel
DEFAULT BRANCH: main
Ran 14 Jun 2026 09:44PM UTC
Jobs 1
Files 1
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

14 Jun 2026 09:43PM UTC coverage: 75.735% (-1.1%) from 76.866%
27512980626

push

github

lpenz
feat: improve const string creation and UTF-8 safety

- Promote `new_const_trunc` to a `const fn`, enabling its use in static and const initializers.
- Implement safe UTF-8 truncation in `new_const_trunc_u8`: the function now backtracks
  to the nearest character boundary if the size limit falls in the middle of a multi-byte character.
- Refactor `new_const_trunc_u8` implementation to be more concise, integrating the
  truncation check into the main copy loop.
- Update documentation for `new_const` and `new_const_trunc`:
    - Removed outdated warnings about potential undefined behavior for `&str` inputs,
      as these functions are now guaranteed to produce valid UTF-8.
    - Added explicit safety warnings to `new_const_trunc_u8` and `new_const_u8` for raw byte inputs.
- Add a comprehensive test case in `tests/copstr_tests.rs` to verify correct multi-byte
  truncation behavior in a const context.

0 of 10 new or added lines in 1 file covered. (0.0%)

1 existing line in 1 file now uncovered.

103 of 136 relevant lines covered (75.74%)

18.34 hits per line

Uncovered Changes

Lines Coverage ∆ File
10
75.74
-1.13% src/copstr.rs

Coverage Regressions

Lines Coverage ∆ File
1
75.74
-1.13% src/copstr.rs
Jobs
ID Job ID Ran Files Coverage
1 27512980626.1 14 Jun 2026 09:44PM UTC 1
75.74
GitHub Action Run
Source Files on build 27512980626
  • Tree
  • List 1
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27512980626
  • 0e3d5397 on github
  • Prev Build on devel (#27380054042)
  • 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