fix(ci): use latest nightly toolchain in the Test workflow, fix assert_matches import and the clippy warning#604
Merged
gurry merged 5 commits intomicrosoft:mainfrom Jan 29, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes CI failures by removing the dependency on the nightly-only std::assert_matches macro and addresses a clippy pedantic warning.
Changes:
- Replaced all
assert_matches!macro usages with stableassert!(matches!(...))alternatives in test code - Refactored
is_cargo_make_color_disabled()to useResult::is_ok_and()instead of.map().unwrap_or()pattern, fixing a clippy pedantic warning
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/wdk-build/src/lib.rs | Removed nightly-only assert_matches import and converted all test assertions to use stable matches! macro within assert! calls |
| crates/wdk-build/src/cargo_make.rs | Refactored environment variable checking to use is_ok_and() for cleaner, more idiomatic code |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #604 +/- ##
==========================================
+ Coverage 76.52% 77.23% +0.71%
==========================================
Files 24 24
Lines 4881 4783 -98
Branches 4881 4783 -98
==========================================
- Hits 3735 3694 -41
+ Misses 1029 972 -57
Partials 117 117 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
wmmc88
reviewed
Jan 28, 2026
assert_matches usage and clippy pedantic warningassert_matches import and the clippy warning
wmmc88
approved these changes
Jan 29, 2026
gurry
approved these changes
Jan 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Lint workflow is failing with:
error[E0432]: unresolved import std::assert_matches[1]clippy::map_unwrap_or(pedantic) warning promoted to failure in the job configuration. [2]I updated my local dev machine to match the toolchain versions used by the pipeline and reproduced the same failure locally.
Also, the issue in
macrotest[3] due to which the Test flow's nightly toolchain version was pinned (to nightly-2025-11-20) is now resolved.In this PR:
assert_matchesimport is fixed.clippypedantic warning inwdk-buildis fixed by replacingenv::var(...).map(...).unwrap_or(false)withResult::is_ok_and(...)inis_cargo_make_color_disabledfn.