1
0
Fork 0
forked from wry/wry

all: use expect attribute where possible

This commit is contained in:
Julian Orth 2024-09-06 11:08:22 +02:00
parent c3b50dc653
commit e377470f3f
134 changed files with 241 additions and 296 deletions

View file

@ -5,12 +5,12 @@ macro_rules! egl_transparent {
pub struct $name(pub *mut u8);
impl $name {
#[allow(dead_code)]
#[allow(clippy::allow_attributes, dead_code)]
pub const fn none() -> Self {
Self(std::ptr::null_mut())
}
#[allow(dead_code)]
#[allow(clippy::allow_attributes, dead_code)]
pub fn is_none(self) -> bool {
self.0.is_null()
}
@ -26,7 +26,7 @@ macro_rules! dynload {
)*
}
) => {
#[allow(non_snake_case)]
#[expect(non_snake_case)]
#[derive(Debug)]
pub struct $container {
_lib: libloading::Library,
@ -45,7 +45,7 @@ macro_rules! dynload {
}
};
$(
#[allow(non_snake_case)]
#[expect(non_snake_case)]
let $fun: $ty =
match lib.get(stringify!($fun).as_bytes()) {
Ok(s) => *s,