From 45b2b12bbcc503e064b29bb3cd62c412e7f8afd2 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Fri, 12 Aug 2022 13:34:57 +0200 Subject: [PATCH] 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. --- ash/src/entry.rs | 8 ++++---- ash/src/vk.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ash/src/entry.rs b/ash/src/entry.rs index fc89fa4..67e6c9a 100644 --- a/ash/src/entry.rs +++ b/ash/src/entry.rs @@ -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, }) } } diff --git a/ash/src/vk.rs b/ash/src/vk.rs index 27d45a5..02a5e9c 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -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::*;