1- #![ cfg_attr( rustfmt, rustfmt_skip) ]
2-
31// This file is Copyright its original authors, visible in version control
42// history.
53//
@@ -189,14 +187,20 @@ pub const FEERATE_FLOOR_SATS_PER_KW: u32 = 253;
189187///
190188/// Note that this does *not* implement [`FeeEstimator`] to make it harder to accidentally mix the
191189/// two.
192- pub ( crate ) struct LowerBoundedFeeEstimator < F : Deref > ( pub F ) where F :: Target : FeeEstimator ;
193-
194- impl < F : Deref > LowerBoundedFeeEstimator < F > where F :: Target : FeeEstimator {
190+ pub ( crate ) struct LowerBoundedFeeEstimator < F : Deref > ( pub F )
191+ where
192+ F :: Target : FeeEstimator ;
193+
194+ impl < F : Deref > LowerBoundedFeeEstimator < F >
195+ where
196+ F :: Target : FeeEstimator ,
197+ {
195198 /// Creates a new `LowerBoundedFeeEstimator` which wraps the provided fee_estimator
196199 pub fn new ( fee_estimator : F ) -> Self {
197200 LowerBoundedFeeEstimator ( fee_estimator)
198201 }
199202
203+ #[ rustfmt:: skip]
200204 pub fn bounded_sat_per_1000_weight ( & self , confirmation_target : ConfirmationTarget ) -> u32 {
201205 cmp:: max (
202206 self . 0 . get_est_sat_per_1000_weight ( confirmation_target) ,
@@ -207,7 +211,9 @@ impl<F: Deref> LowerBoundedFeeEstimator<F> where F::Target: FeeEstimator {
207211
208212#[ cfg( test) ]
209213mod tests {
210- use super :: { FEERATE_FLOOR_SATS_PER_KW , LowerBoundedFeeEstimator , ConfirmationTarget , FeeEstimator } ;
214+ use super :: {
215+ ConfirmationTarget , FeeEstimator , LowerBoundedFeeEstimator , FEERATE_FLOOR_SATS_PER_KW ,
216+ } ;
211217
212218 struct TestFeeEstimator {
213219 sat_per_kw : u32 ,
@@ -220,6 +226,7 @@ mod tests {
220226 }
221227
222228 #[ test]
229+ #[ rustfmt:: skip]
223230 fn test_fee_estimator_less_than_floor ( ) {
224231 let sat_per_kw = FEERATE_FLOOR_SATS_PER_KW - 1 ;
225232 let test_fee_estimator = & TestFeeEstimator { sat_per_kw } ;
@@ -229,6 +236,7 @@ mod tests {
229236 }
230237
231238 #[ test]
239+ #[ rustfmt:: skip]
232240 fn test_fee_estimator_greater_than_floor ( ) {
233241 let sat_per_kw = FEERATE_FLOOR_SATS_PER_KW + 1 ;
234242 let test_fee_estimator = & TestFeeEstimator { sat_per_kw } ;
0 commit comments