Skip to content

fix/clippy: rust 1.99 lints - #3058

Merged
sylvestre merged 1 commit into
mainfrom
bernhard-clippy-1.99-fixes
Nov 23, 2026
Merged

sylvestre merged 1 commit into
mainfrom
bernhard-clippy-1.99-fixes

Conversation

@drahnr

@drahnr drahnr commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Use

  • vec![] over vec!()
  • match Result<Infallible, _> needs different handling

Extracted from #2325

error: use of irregular braces for `vec!` macro
  --> tests/system.rs:91:9
   |
91 |         vec!($( Into::<$t>::into(&$x), )*)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `vec![$( Into::<$t>::into(&$x), )*]`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.99.0/index.html#nonstandard_macro_braces
   = note: `-D clippy::nonstandard-macro-braces` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::nonstandard_macro_braces)]`

error: unreachable expression
   --> tests/harness/mod.rs:472:23
    |
472 |                 match server.start().unwrap() {}
    |                       ^^^^^^^^^^^^^^^^^^^^^^^
    |                       |
    |                       unreachable expression
    |                       any code following this expression is unreachable
    |
note: this expression has type `std::convert::Infallible`, which is uninhabited
   --> tests/harness/mod.rs:472:23
    |
472 |                 match server.start().unwrap() {}
    |                       ^^^^^^^^^^^^^^^^^^^^^^^
    = note: `-D unreachable-code` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unreachable_code)]`

error: could not compile `sccache` (test "dist") due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `sccache` (test "system") due to 2 previous errors

@codecov-commenter

codecov-commenter commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.98%. Comparing base (62773e7) to head (d6d4a76).

Files with missing lines Patch % Lines
tests/harness/mod.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3058   +/-   ##
=======================================
  Coverage   79.98%   79.98%           
=======================================
  Files          76       76           
  Lines       47372    47373    +1     
=======================================
+ Hits        37892    37893    +1     
  Misses       9480     9480           

☔ View full report in Codecov by Harness.
📢 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.

@drahnr drahnr changed the title tests: fix Rust 1.99 lint failures fix/clippy: rust 1.99 lints Nov 23, 2026
@drahnr drahnr self-assigned this Nov 23, 2026
@drahnr
drahnr marked this pull request as ready for review November 23, 2026 07:49
Copilot AI balanced review requested due to automatic review settings November 23, 2026 07:49

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.

🟢 Approval recommended

No active review issues are reported for this Rust 1.99 Clippy test-code cleanup.

No open issues 🎉

What changed in this PR

Updates sccache’s test code to address Rust 1.99 Clippy lints, separating this cleanup from the broader TLS dependency work in #2325.

Changes:

  • Uses square brackets for the vec! invocation.
  • Explicitly handles the server’s uninhabited success value and reports startup errors with a descriptive panic.
File Description
tests/​system.rs Changes vec_from! to use vec![] syntax.
tests/​harness/​mod.rs Replaces unwrap() with explicit matching on the server startup result.

Review effort: Balanced

@drahnr
drahnr requested a review from sylvestre November 23, 2026 07:51
Comment thread tests/harness/mod.rs Resolved
Comment thread tests/system.rs Resolved
@drahnr
drahnr force-pushed the bernhard-clippy-1.99-fixes branch from 0ed86b1 to d6d4a76 Compare November 23, 2026 10:18
@drahnr
drahnr requested a review from sylvestre November 23, 2026 10:40
@sylvestre
sylvestre merged commit 0e8f184 into main Nov 23, 2026
141 of 142 checks passed
@sylvestre

Copy link
Copy Markdown
Collaborator

Thanks for your PR

@drahnr
drahnr deleted the bernhard-clippy-1.99-fixes branch November 23, 2026 19:22
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.

4 participants