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

lpenz / copstr
76%

Build:
DEFAULT BRANCH: main
Repo Added 15 Nov 2021 07:16PM UTC
Token wDvdsRCPDrvdbFngxop2VV57Ic3Uf5tTE regen
Build 96 Last
Files 1
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

LAST BUILD ON BRANCH main
branch: main
CHANGE BRANCH
x
Reset
Sync Branches
  • main
  • devel
  • refs/tags/v0.0.1
  • refs/tags/v0.0.2
  • refs/tags/v0.0.3
  • refs/tags/v0.0.4
  • refs/tags/v0.0.5
  • refs/tags/v0.1.0
  • v0.1.1
  • v0.1.2
  • v0.1.3
  • v0.1.4

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

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

Relevant lines Covered
Build:
Build:
136 RELEVANT LINES 103 COVERED LINES
18.34 HITS PER LINE
Source Files on main
  • Tree
  • List 1
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
27512981552 main 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 n... push 14 Jun 2026 09:44PM UTC lpenz github
75.74
27380172861 main chore: upgrade dependencies and increment version to 0.1.4 push 11 Jun 2026 10:01PM UTC lpenz github
76.87
27379973860 main chore: migrate to rust edition 2024 push 11 Jun 2026 09:56PM UTC lpenz github
76.87
18205488481 main Cargo.*: update dependencies; increment version to 0.1.3 And fix description. push 02 Oct 2025 08:59PM UTC lpenz github
76.87
9550033340 main Cargo.*: update dependencies; increment version to 0.1.3 And fix description. push 17 Jun 2024 03:02PM UTC lpenz github
77.04
7951754885 main CI: upgrade ghworkflow-rust to v0.23.1, and actions push 18 Feb 2024 09:14PM UTC lpenz github
77.54
7277097293 main Cargo.toml: increment version to 0.1.2 push 20 Dec 2023 02:59PM UTC lpenz github
78.81
7276813799 main Cargo.toml: edition=2021, increment version to 0.1.1 push 20 Dec 2023 02:33PM UTC lpenz github
82.07
3073844552 main CI: use lpenz/ghworkflow-rust@v0.10.0 for the rust workflow push 17 Sep 2022 03:22PM UTC Leandro Lisboa Penz github
100.0
3073348817 main CI: use lpenz/ghworkflow-rust@v0.10.0 for the rust workflow push 17 Sep 2022 12:28PM UTC Leandro Lisboa Penz github
100.0
See All Builds (72)

Badge your Repo: copstr

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

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

Refresh
  • Settings
  • Repo on GitHub
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