Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
PR feedback. Formatting and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bw-solana committed Aug 16, 2022
1 parent 8378a36 commit 8da5c54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ci/test-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ nightly_clippy_allows=(

# This link seems to incorrectly trigger in
# `programs/bpf_loader/src/syscalls/{lib,cpi}.rs`
"--allow=clippy::explicit-auto-deref"
"--allow=clippy::explicit_auto_deref"
)

# -Z... is needed because of clippy bug: https://github.com/rust-lang/rust-clippy/issues/4612
Expand Down
3 changes: 2 additions & 1 deletion runtime/src/in_mem_accounts_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1416,9 +1416,10 @@ impl<'a> FlushGuard<'a> {
/// Set the `flushing` atomic flag to true. If the flag was already true, then return `None`
/// (so as to not clear the flag erroneously). Otherwise return `Some(FlushGuard)`.
#[must_use = "if unused, the `flushing` flag will immediately clear"]
#[allow(clippy::unnecessary_lazy_evaluations)]
fn lock(flushing: &'a AtomicBool) -> Option<Self> {
let already_flushing = flushing.swap(true, Ordering::AcqRel);
// Eager evaluation here would result in dropping Self and clearing flushing flag
#[allow(clippy::unnecessary_lazy_evaluations)]
(!already_flushing).then(|| Self { flushing })
}
}
Expand Down

0 comments on commit 8da5c54

Please sign in to comment.