From f65d4457458cb5080b35baa04194e914b3b3c1b1 Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Thu, 3 Feb 2022 13:12:17 +0100 Subject: [PATCH] chore: enforce linting - #![deny(dead_code)] - #![forbid(unsafe_code)] --- src/bin/server.rs | 2 ++ src/lib.rs | 2 ++ tests/cors.rs | 2 ++ tests/dir_listing.rs | 2 ++ tests/static_files.rs | 2 ++ 5 files changed, 10 insertions(+) diff --git a/src/bin/server.rs b/src/bin/server.rs index 90eb6a2..a78e4d2 100644 --- a/src/bin/server.rs +++ b/src/bin/server.rs @@ -1,5 +1,7 @@ +#![forbid(unsafe_code)] #![deny(warnings)] #![deny(rust_2018_idioms)] +#![deny(dead_code)] #[cfg(all(target_env = "musl", target_pointer_width = "64"))] #[global_allocator] diff --git a/src/lib.rs b/src/lib.rs index 2f28353..3969b8d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,7 @@ +#![forbid(unsafe_code)] #![deny(warnings)] #![deny(rust_2018_idioms)] +#![deny(dead_code)] #[macro_use] extern crate anyhow; diff --git a/tests/cors.rs b/tests/cors.rs index 601d2d8..0917a03 100644 --- a/tests/cors.rs +++ b/tests/cors.rs @@ -1,5 +1,7 @@ +#![forbid(unsafe_code)] #![deny(warnings)] #![deny(rust_2018_idioms)] +#![deny(dead_code)] #[cfg(test)] mod tests { diff --git a/tests/dir_listing.rs b/tests/dir_listing.rs index d363aae..8000918 100644 --- a/tests/dir_listing.rs +++ b/tests/dir_listing.rs @@ -1,5 +1,7 @@ +#![forbid(unsafe_code)] #![deny(warnings)] #![deny(rust_2018_idioms)] +#![deny(dead_code)] #[cfg(test)] mod tests { diff --git a/tests/static_files.rs b/tests/static_files.rs index 9bc8735..5b1485a 100644 --- a/tests/static_files.rs +++ b/tests/static_files.rs @@ -1,5 +1,7 @@ +#![forbid(unsafe_code)] #![deny(warnings)] #![deny(rust_2018_idioms)] +#![deny(dead_code)] #[cfg(test)] mod tests { -- libgit2 1.7.2