Repository navigation
fix(error): use core::error::Error and core::fmt in error module - #498
Merged
Mec-iS merged 1 commit intoOct 22, 2026
Conversation
Signed-off-by: ShryukGrandhi <85529990+ShryukGrandhi@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #498 +/- ##
===========================================
+ Coverage 43.97% 85.58% +41.60%
===========================================
Files 85 96 +11
Lines 7281 9373 +2092
===========================================
+ Hits 3202 8022 +4820
+ Misses 4079 1351 -2728 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
|
Thanks for the PR, @ShryukGrandhi. This is a good, minimal first step for #414/#413. What I checked
Suggestions (non-blocking)
Codecov's base commit is 203 commits behind head, so please rebase on |
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.
Fixes #414
Checklist
Current behaviour
src/error/mod.rsimportsstd::error::Errorandstd::fmtfor theFailedandFailedErrortypes. This ties the error module tostdand blocks the no-std work in #413.New expected behaviour
The module imports
core::error::Errorandcore::fmt.core::error::Erroris stable since Rust 1.81, so it is in the MSRV (1.85). The behaviour does not change, becausestd::error::Errorandstd::fmtare re-exports of thecoreitems. Theuse std::error::Errorin the test module stays as it is, as the issue says.A new unit test,
failed_implements_core_error, usesFailedas a&dyn core::error::Errorand checks theDisplayoutput andsource().Tested with:
cargo fmt --all -- --checkcargo clippy --all-features -- -Drust-2018-idioms -Drust-2024-compatibility -Dwarningscargo test --all-features(all pass)cargo +1.85.0 build --all-features(MSRV)Change logs
Changed
src/error/mod.rs: usecore::error::Errorandcore::fmtinstead of thestd::paths.