Skip to content

Conversation

@LesnyRumcajs
Copy link
Member

@LesnyRumcajs LesnyRumcajs commented Jan 23, 2026

Summary of changes

Changes introduced in this pull request:

  • sadly some dependencies are still using it, so it's not a huge win

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Summary by CodeRabbit

  • Chores
    • Removed an unused dependency and replaced internal display/formatting macros with an alternative implementation across the codebase.
    • Changes are internal (derive/formatting adjustments and minor docs) with no user-facing behavioral changes expected; maintenance and build consistency improved.

✏️ Tip: You can customize this high-level summary in your review settings.

@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner January 23, 2026 12:30
@LesnyRumcajs LesnyRumcajs requested review from hanabi1224 and sudo-shashank and removed request for a team January 23, 2026 12:30
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 23, 2026

Walkthrough

Removed the displaydoc dependency and replaced displaydoc::Display derives with derive_more::Display, updating display attribute syntax (e.g., #[displaydoc("...")]#[display("...")]) across several enums and structs; Cargo.toml no longer lists displaydoc = "0.2".

Changes

Cohort / File(s) Summary
Dependency
Cargo.toml
Removed displaydoc = "0.2" from [dependencies].
Display derive updates
src/networks/mod.rs, src/rpc/methods/eth/types.rs, src/rpc/reflect/mod.rs, src/shim/address.rs
Replaced displaydoc::Display with derive_more::Display. Converted #[displaydoc("...")] attributes to #[display("...")], adjusted format placeholders (e.g., {0:#x}{_0:#x}) and removed per-variant displaydoc attributes where applicable.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • sudo-shashank
  • hanabi1224
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: replacing displaydoc with derive_more::Display across multiple files in the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

hanabi1224
hanabi1224 previously approved these changes Jan 23, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/rpc/reflect/mod.rs (1)

88-112: Add #[display(rename_all = "snake_case")] to match serialization output.

The #[serde(rename_all = "snake_case")] only controls JSON serialization; it doesn't affect the Display implementation. Without an explicit #[display(...)] attribute, derive_more::Display will output variant names in PascalCase ("Admin", "Sign", etc.). Add the enum-level attribute to ensure consistency.

🔧 Suggested fix
 #[derive(
     Debug,
     Clone,
     Copy,
     PartialEq,
     Eq,
     PartialOrd,
     Ord,
     Hash,
     derive_more::Display,
     Serialize,
     Deserialize,
 )]
+#[display(rename_all = "snake_case")]
 #[serde(rename_all = "snake_case")]
 pub enum Permission {
src/networks/mod.rs (1)

62-76: Add explicit #[display(...)] attributes to NetworkChain variants to preserve lowercase output.

The migration from displaydoc to derive_more::Display removed custom formatting. Without explicit #[display(...)] attributes, unit variants will display as capitalized variant names (e.g., "Mainnet"), breaking the network_chain_display test which expects lowercase names (e.g., "mainnet"). The Devnet(String) variant will work correctly as derive_more forwards single-field tuples to the inner type's Display.

Suggested fix
 pub enum NetworkChain {
     /// mainnet
+    #[display("mainnet")]
     #[default]
     Mainnet,
     /// calibnet
+    #[display("calibnet")]
     Calibnet,
     /// butterflynet
+    #[display("butterflynet")]
     Butterflynet,
     /// devnet
     Devnet(String),
 }

@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Jan 26, 2026
Merged via the queue into main with commit a871430 Jan 26, 2026
34 checks passed
@LesnyRumcajs LesnyRumcajs deleted the rm-displaydoc branch January 26, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants