Skip to content
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
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ jobs:
- name: 'Verify no_std build'
run: cargo build --target thumbv7em-none-eabihf

clippy:
name: "Clippy"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- run: rustup component add clippy
- run: cargo clippy --all-targets --all-features -- -D warnings

check_formatting:
name: "Check Formatting"
runs-on: ubuntu-latest
Expand Down
12 changes: 4 additions & 8 deletions src/rw_spinlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,14 +447,10 @@ mod tests {
let lock = RwSpinlock::new(0isize);
let read_guard = lock.read();

let write_result = lock.try_write();
match write_result {
None => (),
Some(_) => assert!(
false,
"try_write should not succeed while read_guard is in scope"
),
}
assert!(
lock.try_write().is_none(),
"try_write should not succeed while read_guard is in scope"
);

drop(read_guard);
}
Expand Down
Loading