From 5f327aba86aab67af58f0db44e61d5b71b6eb84e Mon Sep 17 00:00:00 2001 From: ilammy Date: Thu, 30 Dec 2021 20:16:54 +0900 Subject: [PATCH] boring: Suppress Clippy warnings about missing safety docs I'm not quite sure why these are unsafe traits, probably to prevent implementing them for random types accidentally. However, Clippy demands a "# Safety" section in their docs. Tell it to get lost. --- boring/src/pkey.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boring/src/pkey.rs b/boring/src/pkey.rs index 52169d14..c62ee341 100644 --- a/boring/src/pkey.rs +++ b/boring/src/pkey.rs @@ -93,6 +93,7 @@ impl Id { } /// A trait indicating that a key has parameters. +#[allow(clippy::missing_safety_doc)] pub unsafe trait HasParams {} unsafe impl HasParams for Params {} @@ -100,6 +101,7 @@ unsafe impl HasParams for Params {} unsafe impl HasParams for T where T: HasPublic {} /// A trait indicating that a key has public components. +#[allow(clippy::missing_safety_doc)] pub unsafe trait HasPublic {} unsafe impl HasPublic for Public {} @@ -107,6 +109,7 @@ unsafe impl HasPublic for Public {} unsafe impl HasPublic for T where T: HasPrivate {} /// A trait indicating that a key has private components. +#[allow(clippy::missing_safety_doc)] pub unsafe trait HasPrivate {} unsafe impl HasPrivate for Private {}