Fix new/improved Rust 1.63 clippy lints (#649)

More `clippy::use_self` is found in manual code, and superfluous
transmutes in bindgen output are now also found and disallowed.
This commit is contained in:
Marijn Suijten 2022-08-12 13:34:57 +02:00 committed by GitHub
parent fef2c6269c
commit 6d0a29b638
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -377,8 +377,8 @@ mod loaded {
impl fmt::Display for LoadingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
LoadingError::LibraryLoadFailure(err) => fmt::Display::fmt(err, f),
LoadingError::MissingEntryPoint(err) => fmt::Display::fmt(err, f),
Self::LibraryLoadFailure(err) => fmt::Display::fmt(err, f),
Self::MissingEntryPoint(err) => fmt::Display::fmt(err, f),
}
}
}
@ -386,8 +386,8 @@ mod loaded {
impl Error for LoadingError {
fn source(&self) -> Option<&(dyn Error + 'static)> {
Some(match self {
LoadingError::LibraryLoadFailure(err) => err,
LoadingError::MissingEntryPoint(err) => err,
Self::LibraryLoadFailure(err) => err,
Self::MissingEntryPoint(err) => err,
})
}
}

View file

@ -27,7 +27,7 @@ pub use features::*;
mod prelude;
pub use prelude::*;
/// Native bindings from Vulkan headers, generated by bindgen
#[allow(nonstandard_style)]
#[allow(clippy::useless_transmute, nonstandard_style)]
pub mod native;
mod platform_types;
pub use platform_types::*;