From 13aa6d72490b0f04225cd66cd3da9ff361233da1 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Mon, 2 May 2022 14:13:21 +0200 Subject: [PATCH] it: silence dead_code warnings for test-only code --- src/theme.rs | 1 + src/video/drm.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/theme.rs b/src/theme.rs index 102b2e9b..49468244 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -43,6 +43,7 @@ impl Color { } } + #[cfg_attr(not(feature = "it"), allow(dead_code))] pub fn to_rgba_premultiplied(self) -> [u8; 4] { [to_u8(self.r), to_u8(self.g), to_u8(self.b), to_u8(self.a)] } diff --git a/src/video/drm.rs b/src/video/drm.rs index 026abb6b..7351644b 100644 --- a/src/video/drm.rs +++ b/src/video/drm.rs @@ -135,6 +135,7 @@ pub struct Drm { } impl Drm { + #[cfg_attr(not(feature = "it"), allow(dead_code))] pub fn open_existing(fd: OwnedFd) -> Self { Self { fd: Rc::new(fd) } }