Skip to content

Commit

Permalink
deny unsafe_code in shotover (shotover#1614)
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai authored May 8, 2024
1 parent 79b4d1f commit a9c6ab1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shotover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
//! shotover::runner::Shotover::new().run_block();
//! }
//! ```
//!
// If we absolutely need unsafe code, it should be isolated within a separate small crate that exposes a sound safe API.
// "sound" means that it is impossible for any interaction with the public API of the crate to violate an unsafe invariant which causes UB.
#![deny(unsafe_code)]
// Accidentally printing would break json log output
#![deny(clippy::print_stdout)]
#![deny(clippy::print_stderr)]
// allow some clippy lints that we disagree with
#![allow(clippy::needless_doctest_main)]
#![allow(clippy::box_default)]
// Allow dead code if any of the protocol features are disabled
Expand Down

0 comments on commit a9c6ab1

Please sign in to comment.