Skip to content

Commit b8c3566

Browse files
committed
Merge rust-bitcoin#4561: Do not derive Default on CompactTarget
e47836f Do not derive Default on CompactTarget (Tobin C. Harding) Pull request description: It is not immediately obvious what a zero value compact target is. Because of this and the fact that we are trying to release minimal code in `primitives 1.0` its best to remove the `Default` derive. This is an API breaking change. ACKs for top commit: apoelstra: ACK e47836f; successfully ran local tests Tree-SHA512: 7edb067a7ed66af8155b86b2391ee839b0a21b3d8d36b555123b14e93f1822b89c080328464b194e4ff47643440c56fa5afee929fe58b52d5f1cf84c9b96ca83
2 parents 6c228a3 + e47836f commit b8c3566

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

primitives/src/pow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use core::fmt;
1818
/// `CompactTarget` and `Target` is lossy *in both directions* (there are multiple `CompactTarget`
1919
/// values that map to the same `Target` value). Ordering and equality for this type are defined in
2020
/// terms of the underlying `u32`.
21-
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
21+
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
2222
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2323
pub struct CompactTarget(u32);
2424

0 commit comments

Comments
 (0)