chore(hashes): drop no-std supp for hashes#520
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (18)
💤 Files with no reviewable changes (14)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughUpdated Cargo feature sets and dependency declarations across crates; many cfg guards removed from the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@hashes/Cargo.toml`:
- Around line 15-18: The workspace removed no-std support causing dashcore's
no-std builds to fail because hashes' hex.rs and impls.rs use std::io and
std::error::Error unconditionally; restore a no-std-compatible contract by
either re-introducing a "std" feature in hashes' Cargo.toml (e.g., add a feature
like std = ["alloc/std"] or similar) and gate std-only imports behind
cfg(feature = "std") in hex.rs and impls.rs, or keep the removed no-std surface
but then update dash/Cargo.toml/dash/src/lib.rs to drop the no-std feature; if
you choose to keep no-std support, replace uses of std::io and std::error::Error
with cfg-gated alternatives and use core2 equivalents where dash/src/lib.rs
expects core2 compatibility so no-std builds of dashcore can compile against
hashes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c04f5d5a-3de8-43d4-bfa6-1d80f0a0f5c1
📒 Files selected for processing (18)
dash/Cargo.tomlhashes/Cargo.tomlhashes/src/error.rshashes/src/hash160.rshashes/src/hash_x11.rshashes/src/hex.rshashes/src/hmac.rshashes/src/impls.rshashes/src/lib.rshashes/src/ripemd160.rshashes/src/sha1.rshashes/src/sha256.rshashes/src/sha256d.rshashes/src/sha256t.rshashes/src/sha512.rshashes/src/sha512_256.rskey-wallet-manager/Cargo.tomlkey-wallet/Cargo.toml
💤 Files with no reviewable changes (14)
- hashes/src/sha256.rs
- hashes/src/error.rs
- hashes/src/sha512_256.rs
- hashes/src/sha256d.rs
- hashes/src/hmac.rs
- hashes/src/ripemd160.rs
- hashes/src/sha512.rs
- hashes/src/sha256t.rs
- hashes/src/sha1.rs
- hashes/src/lib.rs
- hashes/src/hash160.rs
- hashes/src/hash_x11.rs
- hashes/src/hex.rs
- hashes/src/impls.rs
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v0.42-dev #520 +/- ##
==========================================
Coverage 66.89% 66.90%
==========================================
Files 313 313
Lines 64753 64753
==========================================
+ Hits 43317 43323 +6
+ Misses 21436 21430 -6
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
e42aad7 to
ccecf56
Compare
ccecf56 to
32dd94c
Compare
Summary by CodeRabbit
Refactor
Tests