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

lpenz / copstr
76%
main: 76%

Build:
Build:
LAST BUILD BRANCH: devel
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 devel
branch: devel
CHANGE BRANCH
x
Reset
Sync Branches
  • devel
  • main
  • 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%
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

Relevant lines Covered
Build:
Build:
136 RELEVANT LINES 103 COVERED LINES
18.34 HITS PER LINE
Source Files on devel
  • 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
27512980626 devel 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
27380054042 devel chore: upgrade dependencies and increment version to 0.1.4 push 11 Jun 2026 09:58PM UTC lpenz github
76.87
27380007201 devel chore: migrate to rust edition 2024 push 11 Jun 2026 09:57PM UTC lpenz github
76.87
27379970961 devel chore: migrate to rust edition 2024 push 11 Jun 2026 09:56PM UTC lpenz github
76.87
9549955594 devel Cargo.*: update dependencies; increment version to 0.1.3 And fix description. push 17 Jun 2024 02:57PM UTC lpenz github
77.04
7951629669 devel CI: upgrade ghworkflow-rust to v0.23.1, and actions push 18 Feb 2024 08:51PM UTC lpenz github
77.54
7277073177 devel Cargo.toml: increment version to 0.1.2 push 20 Dec 2023 02:57PM UTC lpenz github
78.81
7277061592 devel Implement PartialOrd and Ord push 20 Dec 2023 02:56PM UTC lpenz github
78.81
7276772183 devel Cargo.toml: edition=2021, increment version to 0.1.1 push 20 Dec 2023 02:30PM UTC lpenz github
82.07
7276372463 devel Implement FromStr push 20 Dec 2023 01:58PM UTC lpenz github
82.07
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