From d385f05c4b8b88332cbefc66907c91ea1bc3ed88 Mon Sep 17 00:00:00 2001 From: Jacob Pratt Date: Fri, 12 Aug 2022 00:39:42 -0400 Subject: [PATCH] Allow unsafe code, but deny undocumented blocks --- src/lib.rs | 2 +- src/parsing/parsed.rs | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d4ff18875..102a450a6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -90,6 +90,7 @@ #![deny( anonymous_parameters, clippy::all, + clippy::undocumented_unsafe_blocks, const_err, illegal_floating_point_literal_pattern, late_bound_lifetime_arguments, @@ -99,7 +100,6 @@ trivial_casts, trivial_numeric_casts, unreachable_pub, - unsafe_code, unsafe_op_in_unsafe_fn, unused_extern_crates )] diff --git a/src/parsing/parsed.rs b/src/parsing/parsed.rs index 6f5a57d10..62d80e8a1 100644 --- a/src/parsing/parsed.rs +++ b/src/parsing/parsed.rs @@ -288,7 +288,6 @@ macro_rules! getters { None } else { // SAFETY: We just checked if the field is present. - #[allow(unsafe_code)] Some(unsafe { self.$name.assume_init() }) } } @@ -330,7 +329,6 @@ impl Parsed { None } else { // SAFETY: We just checked if the field is present. - #[allow(unsafe_code)] Some(unsafe { self.offset_minute.assume_init() }) } } @@ -347,7 +345,6 @@ impl Parsed { None } else { // SAFETY: We just checked if the field is present. - #[allow(unsafe_code)] Some(unsafe { self.offset_second.assume_init() }) } }