1
0
Fork 0
forked from wry/wry

it: silence dead_code warnings for test-only code

This commit is contained in:
Julian Orth 2022-05-02 14:13:21 +02:00
parent 9101d1c757
commit 13aa6d7249
2 changed files with 2 additions and 0 deletions

View file

@ -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)]
}

View file

@ -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) }
}