Skip to content

Fix CI failure from Clippy byte_char_slices lint#63

Merged
Nugine merged 1 commit into
mainfrom
copilot/fix-ci-failure
Apr 26, 2026
Merged

Fix CI failure from Clippy byte_char_slices lint#63
Nugine merged 1 commit into
mainfrom
copilot/fix-ci-failure

Conversation

Copilot AI commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

A scheduled CI run started failing in the develop job after Clippy flagged a test byte array literal as byte_char_slices. The failure was isolated to a single test helper in StrBuf coverage.

  • Problem

    • Clippy now rejects this test pattern under clippy::all:
      let raw_buf = [b'a', b'b', b'c'];
  • Change

    • Replace the byte-by-byte array literal with the equivalent byte string literal dereference:
      let raw_buf = *b"abc";
  • Scope

    • Test-only change in crates/const-str/src/__ctfe/str.rs
    • No behavioral change to library code or public API

Agent-Logs-Url: https://github.com/Nugine/const-str/sessions/01540070-51d7-4725-81c2-b3fa0b668c4b

Co-authored-by: Nugine <30099658+Nugine@users.noreply.github.com>
@Nugine Nugine marked this pull request as ready for review April 26, 2026 15:57
Copilot AI review requested due to automatic review settings April 26, 2026 15:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a new Clippy byte_char_slices lint failure in the const-str crate’s CTFE StrBuf tests by switching a byte-by-byte array literal to an equivalent byte-string literal dereference.

Changes:

  • Replace [b'a', b'b', b'c'] with *b"abc" in a StrBuf::new_unchecked test case to satisfy Clippy.

@codecov

codecov Bot commented Apr 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.86%. Comparing base (d03d206) to head (501498e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #63   +/-   ##
=======================================
  Coverage   94.86%   94.86%           
=======================================
  Files          37       37           
  Lines        3855     3855           
  Branches     3855     3855           
=======================================
  Hits         3657     3657           
  Misses        171      171           
  Partials       27       27           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Nugine Nugine merged commit 07921f4 into main Apr 26, 2026
11 checks passed
@Nugine Nugine deleted the copilot/fix-ci-failure branch April 26, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants