Skip to content

Commit b5c8b57

Browse files
committed
Format using rustfmt
Cargo fmt formats the code using rustfmt and fixes the format diff reported by the ci rustfmt workflow, when there are formatting issues.
1 parent 824d5f8 commit b5c8b57

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

lightning/src/crypto/streams.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl<T: Readable> LengthReadableArgs<[u8; 32]> for ChaChaPolyReadAdapter<T> {
248248
let readable: T = Readable::read(&mut chacha_stream)?;
249249
while chacha_stream.read.bytes_remain() {
250250
let mut buf = [0; 256];
251-
if chacha_stream.read(&mut buf)? == 0{
251+
if chacha_stream.read(&mut buf)? == 0 {
252252
return Err(DecodeError::ShortRead);
253253
}
254254
}

lightning/src/ln/funding.rs

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,15 @@ impl FundingTemplate {
230230
return Err(());
231231
}
232232
let FundingTemplate { shared_input, min_feerate, max_feerate } = self;
233-
build_funding_contribution!(value_added, vec![], shared_input, min_feerate, max_feerate, wallet, await)
233+
build_funding_contribution!(
234+
value_added,
235+
vec![],
236+
shared_input,
237+
min_feerate,
238+
max_feerate,
239+
wallet,
240+
await
241+
)
234242
}
235243

236244
/// Creates a [`FundingContribution`] for adding funds to a channel using `wallet` to perform
@@ -261,7 +269,15 @@ impl FundingTemplate {
261269
return Err(());
262270
}
263271
let FundingTemplate { shared_input, min_feerate, max_feerate } = self;
264-
build_funding_contribution!(Amount::ZERO, outputs, shared_input, min_feerate, max_feerate, wallet, await)
272+
build_funding_contribution!(
273+
Amount::ZERO,
274+
outputs,
275+
shared_input,
276+
min_feerate,
277+
max_feerate,
278+
wallet,
279+
await
280+
)
265281
}
266282

267283
/// Creates a [`FundingContribution`] for removing funds from a channel using `wallet` to
@@ -292,7 +308,15 @@ impl FundingTemplate {
292308
return Err(());
293309
}
294310
let FundingTemplate { shared_input, min_feerate, max_feerate } = self;
295-
build_funding_contribution!(value_added, outputs, shared_input, min_feerate, max_feerate, wallet, await)
311+
build_funding_contribution!(
312+
value_added,
313+
outputs,
314+
shared_input,
315+
min_feerate,
316+
max_feerate,
317+
wallet,
318+
await
319+
)
296320
}
297321

298322
/// Creates a [`FundingContribution`] for both adding and removing funds from a channel using

0 commit comments

Comments
 (0)