chore: remove serde_tuple in favor of fvm_ipld_encoding::tuple#5906
Conversation
WalkthroughThis change removes the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Suggested labels
Suggested reviewers
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (4)
src/message/signed_message.rs (1)
13-13: Same wildcard-import concern as noted inverifreg/mod.rs– consider switching to an explicit list.src/blocks/header.rs (1)
22-22: Wildcard import can be narrowedPlease see the earlier comment on using explicit imports for
Serialize_tuple/Deserialize_tuple.src/cli/subcommands/state_cmd.rs (1)
12-12: Wildcard import can be narrowedSame note on replacing
tuple::*with the two concrete derive macros.src/libp2p/hello/message.rs (1)
7-7: Wildcard import can be narrowedSee initial comment – import only the derive macros needed.
🧹 Nitpick comments (6)
src/rpc/methods/miner.rs (1)
34-34: Prefer explicit macro imports over wildcard for clarityUsing a wildcard (
*) pulls every symbol fromtupleinto scope, which can obscure where individual macros originate and may accidentally shadow similarly-named items in the future. Import only what the file actually needs — here, justSerialize_tuple.-use fvm_ipld_encoding::tuple::*; +use fvm_ipld_encoding::tuple::Serialize_tuple;src/blocks/gossip_block.rs (1)
5-5: Limit tuple macro import setOnly the derive macros are required; bring them in explicitly to improve readability and avoid namespace clutter.
-use fvm_ipld_encoding::tuple::*; +use fvm_ipld_encoding::tuple::{Serialize_tuple, Deserialize_tuple};src/blocks/block.rs (1)
8-8: Narrow tuple macro importSame rationale as above – import just the two derive macros actually used in this module.
-use fvm_ipld_encoding::tuple::*; +use fvm_ipld_encoding::tuple::{Serialize_tuple, Deserialize_tuple};src/blocks/ticket.rs (1)
5-5: Replace wildcard with specific derivesKeep the import surface minimal; only
Serialize_tupleandDeserialize_tupleare necessary here.-use fvm_ipld_encoding::tuple::*; +use fvm_ipld_encoding::tuple::{Serialize_tuple, Deserialize_tuple};src/rpc/methods/f3/types.rs (1)
16-16: Restrict tuple macro glob importFor consistency with other modules and to avoid bringing in unused items, replace the wildcard with the explicit derive macros consumed below.
-use fvm_ipld_encoding::tuple::*; +use fvm_ipld_encoding::tuple::{Serialize_tuple, Deserialize_tuple};src/shim/actors/builtin/verifreg/mod.rs (1)
17-17: Prefer explicit tuple macro imports over a wildcard
use fvm_ipld_encoding::tuple::*;brings every item in thetuplemodule into scope.
Given only the derive macros are required (Serialize_tuple,Deserialize_tuple), an explicit list keeps the namespace clean and prevents accidental collisions as the dependency evolves.-use fvm_ipld_encoding::tuple::*; +use fvm_ipld_encoding::tuple::{Deserialize_tuple, Serialize_tuple};
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (15)
Cargo.toml(0 hunks)src/beacon/beacon_entries.rs(1 hunks)src/blocks/block.rs(1 hunks)src/blocks/election_proof.rs(1 hunks)src/blocks/gossip_block.rs(1 hunks)src/blocks/header.rs(1 hunks)src/blocks/ticket.rs(1 hunks)src/cli/subcommands/state_cmd.rs(1 hunks)src/libp2p/chain_exchange/message.rs(1 hunks)src/libp2p/hello/message.rs(1 hunks)src/lotus_json/mod.rs(1 hunks)src/message/signed_message.rs(1 hunks)src/rpc/methods/f3/types.rs(1 hunks)src/rpc/methods/miner.rs(1 hunks)src/shim/actors/builtin/verifreg/mod.rs(1 hunks)
💤 Files with no reviewable changes (1)
- Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: Build forest binaries on Linux AMD64
- GitHub Check: tests
- GitHub Check: tests-release
- GitHub Check: cargo-publish-dry-run
- GitHub Check: Build MacOS
- GitHub Check: Build Ubuntu
- GitHub Check: All lint checks
- GitHub Check: Analyze (rust)
- GitHub Check: Analyze (go)
🔇 Additional comments (4)
src/beacon/beacon_entries.rs (1)
7-7: LGTM - Clean dependency replacementThe import change from
serde_tupletofvm_ipld_encoding::tuple::*is correct and maintains functional equivalency while removing the external dependency.src/libp2p/chain_exchange/message.rs (1)
10-10: LGTM - Consistent dependency migrationThe import replacement follows the same pattern as other files in this PR, switching from
serde_tupleto the re-exportedfvm_ipld_encoding::tuplefunctionality.src/lotus_json/mod.rs (1)
58-58: LGTM - Documentation updated to reflect new import pathThe documentation correctly updates the example to use
fvm_ipld_encoding::tuple::Serialize_tupleinstead of the oldserde_tuple::Serialize_tuple, maintaining consistency with the codebase changes.src/blocks/election_proof.rs (1)
7-7: LGTM - Completes the consistent dependency migrationThe import change aligns with the broader refactoring effort to replace
serde_tuplewithfvm_ipld_encoding::tupleacross the codebase, maintaining functional equivalency.
Summary of changes
This PR removes
serde_tuplefrom deps in favor offvm_ipld_encoding::tuplewhich is a re-export ofserde_tupleChanges introduced in this pull request:
Reference issue to close (if applicable)
Closes
Other information and links
Change checklist
Summary by CodeRabbit