Skip to content

Commit

Permalink
Add multiple unsafe blocks per op lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MolotovCherry committed Dec 26, 2024
1 parent ba795e5 commit 03ef479
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ features = [
]

[workspace.lints.rust]
unsafe_op_in_unsafe_fn = "deny"
unsafe_op_in_unsafe_fn = "warn"

[workspace.lints.clippy]
multiple_unsafe_ops_per_block = "warn"

[profile.dev]
opt-level = 1
Expand Down
2 changes: 2 additions & 0 deletions crates/shared/src/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ impl Server {

let fut = async {
loop {
// this lint is returning a false positive?
#[allow(clippy::multiple_unsafe_ops_per_block)]
unsafe {
self.connect(&mut sa, &mut process_cmd).await?;
}
Expand Down

0 comments on commit 03ef479

Please sign in to comment.