Skip to content

Commit 0ab34bd

Browse files
committed
Run rustfmt on routing/mod.rs/re-enable it on the routing mod
In d257b8a we dropped our old `rustfmt` per-file exclusion logic and replaced it with `rustfmt_skip` tags in each previously-skipped files. This had the unintended consequence of fully disabling `rustfmt` across the `lightning` crate: `rustfmt` operates recursively across files in any module it is told to format. Previously, because we were running `rustfmt` on each non-excluded file, this meant we wanted to exclude `mod.rs` and `lib.rs` files - not doing so would result in the entire module/crate being formatted. However, `cargo fmt --check` only runs `rustfmt` once - on `lib.rs`. Because we added a top-level `rustfmt_skip` in `lib.rs` this caused `rustfmt` to ignore it and all modules. Here we prepare to fix this by formatting `lightning/src/routing/mod.rs`.
1 parent 8a9419a commit 0ab34bd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lightning/src/routing/mod.rs

Lines changed: 2 additions & 4 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
//
@@ -11,10 +9,10 @@
119

1210
//! Structs and impls for receiving messages about the network and storing the topology live here.
1311
14-
pub mod utxo;
1512
pub mod gossip;
13+
mod log_approx;
1614
pub mod router;
1715
pub mod scoring;
18-
mod log_approx;
1916
#[cfg(test)]
2017
pub(crate) mod test_utils;
18+
pub mod utxo;

0 commit comments

Comments
 (0)