Skip to content

Commit

Permalink
Add CI job to run cargo fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
qwandor committed Apr 8, 2024
1 parent 1049911 commit f913ec5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,20 @@ jobs:
- rust_version: stable
rustflags: --deny warnings

format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Copy Cargo.toml
run: cp Cargo.ci.toml Cargo.toml
- name: Format Rust code
run: cargo fmt --all -- --check

ci:
if: ${{ success() }}
# all new jobs must be added to this list
needs: [build]
needs: [build, format]
runs-on: ubuntu-latest
steps:
- name: CI succeeded
Expand Down
5 changes: 1 addition & 4 deletions nrf-hal-common/src/i2s.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,10 +682,7 @@ struct Inner<B> {
impl<B> Transfer<B> {
/// Returns `true` if the transfer is done.
pub fn is_done(&self) -> bool {
if let Some(inner) = self
.inner
.as_ref()
{
if let Some(inner) = self.inner.as_ref() {
inner.i2s.is_event_triggered(I2SEvent::RxPtrUpdated)
|| inner.i2s.is_event_triggered(I2SEvent::TxPtrUpdated)
} else {
Expand Down

0 comments on commit f913ec5

Please sign in to comment.