Skip to content

Commit a871430

Browse files
authored
chore: remove displaydoc in favour of derive_more::Display (#6472)
1 parent 2bc0ba0 commit a871430

File tree

6 files changed

+6
-13
lines changed

6 files changed

+6
-13
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ derive_more = { version = "2", features = ["from", "into"] }
6262
dialoguer = "0.12"
6363
digest = "0.10"
6464
directories = "6"
65-
displaydoc = "0.2"
6665
educe = { version = "0.6", features = ["Debug"], default-features = false }
6766
enumflags2 = "0.7"
6867
ethereum-types = { version = "0.16", features = ["ethbloom"] }

src/networks/mod.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,16 @@ static INITIAL_FIL_RESERVED: LazyLock<TokenAmount> =
6060
/// Forest builtin `filecoin` network chains. In general only `mainnet` and its
6161
/// chain information should be considered stable.
6262
#[derive(
63-
Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default, Hash, displaydoc::Display,
63+
Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default, Hash, derive_more::Display,
6464
)]
6565
#[cfg_attr(test, derive(derive_quickcheck_arbitrary::Arbitrary))]
6666
#[serde(tag = "type", content = "name", rename_all = "lowercase")]
67+
#[display(rename_all = "lowercase")]
6768
pub enum NetworkChain {
68-
/// mainnet
6969
#[default]
7070
Mainnet,
71-
/// calibnet
7271
Calibnet,
73-
/// butterflynet
7472
Butterflynet,
75-
/// devnet
76-
#[displaydoc("{0}")]
7773
Devnet(String),
7874
}
7975

src/rpc/methods/eth/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,12 +386,12 @@ impl TryFrom<EthCallMessage> for Message {
386386
Default,
387387
Clone,
388388
JsonSchema,
389-
displaydoc::Display,
389+
derive_more::Display,
390390
derive_more::From,
391391
derive_more::Into,
392392
derive_more::FromStr,
393393
)]
394-
#[displaydoc("{0:#x}")]
394+
#[display("{_0:#x}")]
395395
pub struct EthHash(#[schemars(with = "String")] pub ethereum_types::H256);
396396
lotus_json_with_self!(EthHash);
397397

src/rpc/reflect/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub trait RpcMethod<const ARITY: usize> {
9595
PartialOrd,
9696
Ord,
9797
Hash,
98-
displaydoc::Display,
98+
derive_more::Display,
9999
Serialize,
100100
Deserialize,
101101
)]

src/shim/address.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,11 @@ impl GetSize for Address {
285285
Ord,
286286
Serialize,
287287
Deserialize,
288-
displaydoc::Display,
288+
derive_more::Display,
289289
derive_more::From,
290290
derive_more::Into,
291291
)]
292292
#[serde(transparent)]
293-
#[displaydoc("{0}")]
294293
pub struct StrictAddress(pub Address);
295294

296295
impl FromStr for StrictAddress {

0 commit comments

Comments
 (0)