Skip to content

Commit 9874e55

Browse files
committed
Convert file-level rustfmt skip to fn level skips
1 parent 5688166 commit 9874e55

33 files changed

+3878
-1171
lines changed

fuzz/src/msg_targets/mod.rs

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,47 @@
1-
#![cfg_attr(rustfmt, rustfmt_skip)]
2-
mod utils;
31
pub mod msg_accept_channel;
2+
pub mod msg_accept_channel_v2;
43
pub mod msg_announcement_signatures;
4+
pub mod msg_channel_announcement;
5+
pub mod msg_channel_details;
6+
pub mod msg_channel_ready;
7+
pub mod msg_channel_reestablish;
8+
pub mod msg_channel_update;
59
pub mod msg_closing_signed;
610
pub mod msg_commitment_signed;
11+
pub mod msg_decoded_onion_error_packet;
12+
pub mod msg_error_message;
713
pub mod msg_funding_created;
8-
pub mod msg_channel_ready;
914
pub mod msg_funding_signed;
1015
pub mod msg_gossip_timestamp_filter;
1116
pub mod msg_init;
17+
pub mod msg_node_announcement;
1218
pub mod msg_open_channel;
19+
pub mod msg_open_channel_v2;
1320
pub mod msg_ping;
1421
pub mod msg_pong;
1522
pub mod msg_query_channel_range;
23+
pub mod msg_query_short_channel_ids;
24+
pub mod msg_reply_channel_range;
1625
pub mod msg_reply_short_channel_ids_end;
1726
pub mod msg_revoke_and_ack;
1827
pub mod msg_shutdown;
28+
pub mod msg_splice_ack;
29+
pub mod msg_splice_init;
30+
pub mod msg_splice_locked;
31+
pub mod msg_stfu;
32+
pub mod msg_tx_abort;
33+
pub mod msg_tx_ack_rbf;
34+
pub mod msg_tx_add_input;
35+
pub mod msg_tx_add_output;
36+
pub mod msg_tx_complete;
37+
pub mod msg_tx_init_rbf;
38+
pub mod msg_tx_remove_input;
39+
pub mod msg_tx_remove_output;
40+
pub mod msg_tx_signatures;
1941
pub mod msg_update_add_htlc;
2042
pub mod msg_update_fail_htlc;
2143
pub mod msg_update_fail_malformed_htlc;
2244
pub mod msg_update_fee;
2345
pub mod msg_update_fulfill_htlc;
24-
pub mod msg_channel_reestablish;
25-
pub mod msg_decoded_onion_error_packet;
26-
pub mod msg_channel_announcement;
27-
pub mod msg_node_announcement;
28-
pub mod msg_channel_update;
29-
pub mod msg_query_short_channel_ids;
30-
pub mod msg_reply_channel_range;
31-
pub mod msg_error_message;
3246
pub mod msg_warning_message;
33-
pub mod msg_channel_details;
34-
pub mod msg_open_channel_v2;
35-
pub mod msg_accept_channel_v2;
36-
pub mod msg_tx_add_input;
37-
pub mod msg_tx_add_output;
38-
pub mod msg_tx_remove_input;
39-
pub mod msg_tx_remove_output;
40-
pub mod msg_tx_complete;
41-
pub mod msg_tx_signatures;
42-
pub mod msg_tx_init_rbf;
43-
pub mod msg_tx_ack_rbf;
44-
pub mod msg_tx_abort;
45-
pub mod msg_stfu;
46-
pub mod msg_splice_init;
47-
pub mod msg_splice_ack;
48-
pub mod msg_splice_locked;
47+
mod utils;

lightning/src/chain/chaininterface.rs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
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)]
209213
mod 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

Comments
 (0)