Skip to content

ci: Run cargo fmt --check to ensure code is always properly formatted #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ jobs:
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
components: rustfmt, clippy

- run: cargo fmt --check
- run: cargo clippy --target=${{ matrix.target }} -- -Dwarnings
- run: cargo build --target=${{ matrix.target }}
- run: cargo doc --target=${{ matrix.target }}
env:
RUSTDOCFLAGS: -Dwarnings
# Temporary test non-target only.
# TODO: Test in emulator or something.
- run: cargo test
11 changes: 7 additions & 4 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ impl fmt::Debug for Config {
.field("buf_id", &self.buf_id)
.field("filter", &self.filter)
.field("tag", &self.tag)
.field("custom_format", match &self.custom_format {
Some(_) => &"Some(_)",
None => &"None",
})
.field(
"custom_format",
match &self.custom_format {
Some(_) => &"Some(_)",
None => &"None",
},
)
.finish()
}
}
Expand Down