@@ -811,22 +811,17 @@ impl<'a, D> TxBuilder<'a, D, DefaultCoinSelectionAlgorithm, BumpFee> {
811811}
812812
813813/// Ordering of the transaction's inputs and outputs
814- #[ derive( Debug , Ord , PartialOrd , Eq , PartialEq , Hash , Clone , Copy ) ]
814+ #[ derive( Default , Debug , Ord , PartialOrd , Eq , PartialEq , Hash , Clone , Copy ) ]
815815pub enum TxOrdering {
816816 /// Randomized (default)
817+ #[ default]
817818 Shuffle ,
818819 /// Unchanged
819820 Untouched ,
820821 /// BIP69 / Lexicographic
821822 Bip69Lexicographic ,
822823}
823824
824- impl Default for TxOrdering {
825- fn default ( ) -> Self {
826- TxOrdering :: Shuffle
827- }
828- }
829-
830825impl TxOrdering {
831826 /// Sort transaction inputs and outputs by [`TxOrdering`] variant
832827 pub fn sort_tx ( & self , tx : & mut Transaction ) {
@@ -880,22 +875,17 @@ impl RbfValue {
880875}
881876
882877/// Policy regarding the use of change outputs when creating a transaction
883- #[ derive( Debug , Ord , PartialOrd , Eq , PartialEq , Hash , Clone , Copy ) ]
878+ #[ derive( Default , Debug , Ord , PartialOrd , Eq , PartialEq , Hash , Clone , Copy ) ]
884879pub enum ChangeSpendPolicy {
885880 /// Use both change and non-change outputs (default)
881+ #[ default]
886882 ChangeAllowed ,
887883 /// Only use change outputs (see [`TxBuilder::only_spend_change`])
888884 OnlyChange ,
889885 /// Only use non-change outputs (see [`TxBuilder::do_not_spend_change`])
890886 ChangeForbidden ,
891887}
892888
893- impl Default for ChangeSpendPolicy {
894- fn default ( ) -> Self {
895- ChangeSpendPolicy :: ChangeAllowed
896- }
897- }
898-
899889impl ChangeSpendPolicy {
900890 pub ( crate ) fn is_satisfied_by ( & self , utxo : & LocalOutput ) -> bool {
901891 match self {
0 commit comments