Skip to content

Commit 91137c7

Browse files
committed
ci: Run cargo fmt --check to ensure code is always properly formatted
1 parent 151aefc commit 91137c7

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ jobs:
3434
with:
3535
toolchain: ${{ matrix.toolchain }}
3636
target: ${{ matrix.target }}
37+
components: rustfmt
3738

39+
- run: cargo fmt --check
3840
- run: cargo build --target=${{ matrix.target }}
3941
- run: cargo doc --target=${{ matrix.target }}
4042
# Temporary test non-target only.

src/config.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ impl fmt::Debug for Config {
2020
.field("buf_id", &self.buf_id)
2121
.field("filter", &self.filter)
2222
.field("tag", &self.tag)
23-
.field("custom_format", match &self.custom_format {
24-
Some(_) => &"Some(_)",
25-
None => &"None",
26-
})
23+
.field(
24+
"custom_format",
25+
match &self.custom_format {
26+
Some(_) => &"Some(_)",
27+
None => &"None",
28+
},
29+
)
2730
.finish()
2831
}
2932
}

0 commit comments

Comments
 (0)