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,

View file

@ -3,7 +3,6 @@ use {crate::gfx_apis::gl::sys::GLenum, uapi::c};
pub type EGLint = i32;
pub type EGLenum = c::c_uint;
pub type EGLBoolean = c::c_uint;
#[allow(dead_code)]
pub type EGLuint64KHR = u64;
pub type EGLAttrib = isize;
pub type EGLSyncKHR = *mut u8;

View file

@ -7,7 +7,7 @@ pub type GLenum = c::c_uint;
pub type GLfloat = f32;
pub type GLint = c::c_int;
pub type GLsizei = c::c_int;
#[allow(dead_code)]
#[expect(dead_code)]
pub type GLubyte = u8;
pub type GLuint = c::c_uint;
@ -32,7 +32,7 @@ pub const GL_RENDERBUFFER: GLenum = 0x8D41;
pub const GL_TEXTURE0: GLenum = 0x84C0;
pub const GL_TEXTURE_2D: GLenum = 0x0DE1;
pub const GL_TEXTURE_EXTERNAL_OES: GLenum = 0x8D65;
#[allow(dead_code)]
#[expect(dead_code)]
pub const GL_TEXTURE_MAG_FILTER: GLenum = 0x2800;
pub const GL_TEXTURE_MIN_FILTER: GLenum = 0x2801;
pub const GL_TEXTURE_WRAP_S: GLenum = 0x2802;

View file

@ -70,7 +70,7 @@ impl VulkanDevice {
.offset(push_constant_offset)
.size(frag_push_size),
);
#[allow(unused_assignments)]
#[expect(unused_assignments)]
{
push_constant_offset += frag_push_size;
}