Skip to content

Commit 41f3ca8

Browse files
committed
Merge #242: Add missing Debug implementations and a lint to catch them in future
4273c1f Add lint for missing Debug implementation (Jamil Lambert, PhD) bace448 Add missing derives (Jamil Lambert, PhD) Pull request description: There were a few structs with a missing Debug derive that were not caught by the linter. - Add the missing Derives. - Add a rustc lint to `types` to catch these in future. Closes #240 ACKs for top commit: tcharding: ACK 4273c1f Tree-SHA512: 1cd8e7cdd08fde63f6b34069675a9122c5aee55cd8704c31f74ae6cdd4ebd1378cd41ee568a1888be3f054a19a11c98243304d6f73d0978d35b58fcb1df16edb
2 parents 09d0f90 + 4273c1f commit 41f3ca8

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

types/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ serde = { version = "1.0.103", default-features = false, features = [ "derive",
2222
serde_json = { version = "1.0.117" }
2323

2424
[dev-dependencies]
25+
26+
[lints.rust]
27+
missing_debug_implementations = "deny"

types/src/model/blockchain.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ pub struct GetBlockHeaderVerbose {
242242
}
243243

244244
/// Models the result of JSON-RPC method `getblockstats`.
245+
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
245246
pub struct GetBlockStats {
246247
/// Average fee in the block.
247248
pub average_fee: Amount,

types/src/model/wallet.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ pub struct GetNewAddress(pub Address<NetworkUnchecked>);
270270
pub struct GetRawChangeAddress(pub Address<NetworkUnchecked>);
271271

272272
/// Models the result of JSON-RPC method `getreceivedbyaddress`.
273+
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
273274
pub struct GetReceivedByAddress(pub Amount);
274275

275276
/// Models the result of JSON-RPC method `gettransaction`.
@@ -332,6 +333,7 @@ pub struct GetTransactionDetail {
332333
}
333334

334335
/// Models the result of JSON-RPC method `getunconfirmedbalance`.
336+
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
335337
pub struct GetUnconfirmedBalance(pub Amount);
336338

337339
/// Models the result of JSON-RPC method `getwalletinfo`.

0 commit comments

Comments
 (0)