-
Notifications
You must be signed in to change notification settings - Fork 32
fix: resolve clippy unused_assignments warnings in error.rs #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add #![allow(unused_assignments)] to suppress false positives from thiserror/miette macro-generated code - Improve error messages to use previously unused fields: - ConfigFileNotFound, ConfigReadFailed, ConfigWriteFailed now show path - ConfigValidationFailed now shows list of issues - ProviderConfigResolutionFailed now shows details - AgeIdentityNotFound, AgeIdentityReadFailed now show path - AgeIdentityParseFailed, AgeEncryptionFailed, AgeDecryptionFailed now show details Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR resolves clippy unused_assignments warnings in error.rs by adding a module-level allow directive and improving error message formatting to include previously unused fields.
Changes:
- Added
#![allow(unused_assignments)]to suppress false positives from thiserror/miette macro-generated code - Enhanced error messages to include contextual information from struct fields (paths, details, issues)
- Updated one help message to reference "above" instead of "below" to match the new error format
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #[diagnostic( | ||
| code(fnox::config::validation_failed), | ||
| help("Review the errors below and update your fnox.toml file") | ||
| help("Review the errors above and update your fnox.toml file") |
Copilot
AI
Jan 14, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The help message refers to 'errors above' but the actual validation issues appear inline within the error message itself (joined with newlines), not above it in the output. Consider changing to 'Review the validation issues and update your fnox.toml file' for clarity.
| help("Review the errors above and update your fnox.toml file") | |
| help("Review the validation issues and update your fnox.toml file") |
## [1.8.0](https://github.com/jdx/fnox/compare/v1.7.0..v1.8.0) - 2026-01-17 ### 🚀 Features - add passwordstate provider by [@davidolrik](https://github.com/davidolrik) in [#147](#147) - aws-ps batch concurrency, aws-kms 10 -> 100 concurrency by [@johnpyp](https://github.com/johnpyp) in [#180](#180) ### 🐛 Bug Fixes - resolve clippy unused_assignments warnings in error.rs by [@jdx](https://github.com/jdx) in [#174](#174) - improve AWS SDK error messages and enable SSO support by [@daghoidahl](https://github.com/daghoidahl) in [#173](#173) ### 📚 Documentation - add AWS Parameter store to sidebar and provider lists by [@johnpyp](https://github.com/johnpyp) in [#178](#178) ### 🧪 Testing - Add missing skip logic to aws_parameter_store.bats by [@jdx](https://github.com/jdx) in [#145](#145) ### 🛡️ Security - **(deps)** update azure-sdk-for-rust monorepo to 0.30 by [@renovate[bot]](https://github.com/renovate[bot]) in [#144](#144) ### 📦️ Dependency Updates - pin dependencies by [@renovate[bot]](https://github.com/renovate[bot]) in [#133](#133) - update rust crate demand to v1.8.0 by [@renovate[bot]](https://github.com/renovate[bot]) in [#134](#134) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#137](#137) - update rust crate usage-lib to v2.9.0 by [@renovate[bot]](https://github.com/renovate[bot]) in [#143](#143) - update rust crate age to v0.11.2 by [@renovate[bot]](https://github.com/renovate[bot]) in [#149](#149) - update aws-sdk-rust monorepo to v1.8.12 by [@renovate[bot]](https://github.com/renovate[bot]) in [#148](#148) - update rust crate gcp_auth to v0.12.5 by [@renovate[bot]](https://github.com/renovate[bot]) in [#151](#151) - update rust crate dbus to v0.9.10 by [@renovate[bot]](https://github.com/renovate[bot]) in [#150](#150) - update rust crate google-cloud-secretmanager-v1 to v1.2.0 by [@renovate[bot]](https://github.com/renovate[bot]) in [#153](#153) - update rust crate reqwest to v0.12.25 by [@renovate[bot]](https://github.com/renovate[bot]) in [#152](#152) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#154](#154) - update dependency vue to v3.5.26 by [@renovate[bot]](https://github.com/renovate[bot]) in [#156](#156) - update rust crate console to v0.16.2 by [@renovate[bot]](https://github.com/renovate[bot]) in [#157](#157) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#162](#162) - update rust crate arc-swap to v1.8.0 by [@renovate[bot]](https://github.com/renovate[bot]) in [#167](#167) - update rust crate chrono to v0.4.43 by [@renovate[bot]](https://github.com/renovate[bot]) in [#176](#176) - update aws-sdk-rust monorepo to v1.98.0 by [@renovate[bot]](https://github.com/renovate[bot]) in [#177](#177) ### New Contributors - @johnpyp made their first contribution in [#180](#180) - @daghoidahl made their first contribution in [#173](#173) - @davidolrik made their first contribution in [#147](#147)
Summary
#![allow(unused_assignments)]to suppress false positives from thiserror/miette macro-generated codeChanges
Error variants now include more context in their messages:
ConfigFileNotFound,ConfigReadFailed,ConfigWriteFailed- now show pathConfigValidationFailed- now shows list of issuesProviderConfigResolutionFailed- now shows detailsAgeIdentityNotFound,AgeIdentityReadFailed- now show pathAgeIdentityParseFailed,AgeEncryptionFailed,AgeDecryptionFailed- now show detailsTest plan
cargo clippypasses with no warnings🤖 Generated with Claude Code
Note
Improves diagnostics and eliminates clippy noise in
src/error.rs.#![allow(unused_assignments)]to avoid false positives fromthiserror/miettemacro-generated codeConfigFileNotFound,ConfigReadFailed,ConfigWriteFailed) now includepath;ConfigValidationFailedprintsissuesProviderConfigResolutionFailed) now includedetailsAgeIdentityNotFound,AgeIdentityReadFailed) now includepath; (AgeIdentityParseFailed,AgeEncryptionFailed,AgeDecryptionFailed) includedetailsWritten by Cursor Bugbot for commit 55d98ad. This will update automatically on new commits. Configure here.