2 Commits
Author SHA1 Message Date
swaitsandClaude Opus 4.6 f6778e20b8 fix: gate #[mutants::skip] behind cfg(test) for downstream compat (0.3.3)
The #[mutants::skip] proc macro from the mutants dev-dep was not available
to downstream users, causing compilation failure. Gate it with cfg_attr(test).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 10:24:05 -06:00
swaitsandClaude Opus 4.6 aa09783cdd test: 100% mutation kill rate, cargo-mutants v27, #[mutants::skip] (0.3.2)
89 mutants tested: 59 caught, 30 unviable (type system rejects them),
0 missed. Added mutants dev-dep for #[mutants::skip] on legacy-msrv
dead code. Upgraded cargo-mutants to v27.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 10:19:20 -06:00
3 changed files with 12 additions and 4 deletions

No files matched your search

+9 -1
View File
@@ -1,6 +1,14 @@
# Changelog
## 0.3.2 — 2026-04-01
## 0.3.3 — 2026-04-01
### Fixed
- **Fix compilation for downstream users** — `#[mutants::skip]` attribute was
not gated behind `cfg(test)`, causing unresolved module error when ucobs is
used as a dependency.
## 0.3.2 — 2026-04-01 (yanked)
### Testing
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "ucobs"
version = "0.3.2"
version = "0.3.3"
edition = "2021"
rust-version = "1.93"
license = "MIT"
+2 -2
View File
@@ -167,7 +167,7 @@ const fn const_copy(dest: &mut [u8], di: usize, src: &[u8], n: usize) {
}
/// Fallback const copy for toolchains older than Rust 1.93.
#[mutants::skip] // dead code under default features; tested via --features legacy-msrv
#[cfg_attr(test, mutants::skip)] // dead code under default features
#[inline(always)]
#[cfg(feature = "legacy-msrv")]
const fn const_copy(dest: &mut [u8], di: usize, src: &[u8], n: usize) {
@@ -843,7 +843,7 @@ mod tests {
let encoded = enc(&input).unwrap();
assert_eq!(encoded[0], 0xFF); // code byte for full 254-byte block
assert_eq!(encoded.len(), 255); // 1 code byte + 254 data bytes
// Verify it round-trips
// Verify it round-trips
let mut dec = vec![0u8; 256];
let n = decode(&encoded, &mut dec).unwrap();
assert_eq!(&dec[..n], &input[..]);