From 51080bd5224deb0c86589622e3cb3578df02aea6 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Thu, 11 Jan 2024 00:18:28 +0100 Subject: [PATCH] Fix Rust 1.75 clippy lints (#859) Rust 1.75 has once again gotten a bit more complete/strict when linting code. `.get(0)` is now recommended to be replaced with `.first()`, and needless glob reexports are equally denied (the modules in question either contain macros which are already reexported via `#[macro_export]`, or contain `impl` blocks exclusively which cannot be referred to as item paths either). --- ash/src/vk.rs | 2 -- generator/src/lib.rs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ash/src/vk.rs b/ash/src/vk.rs index 17b49d1..1d551ee 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -5,7 +5,6 @@ )] #[macro_use] mod macros; -pub use macros::*; mod aliases; pub use aliases::*; mod bitflags; @@ -21,7 +20,6 @@ pub use enums::*; mod extensions; pub use extensions::*; mod feature_extensions; -pub use feature_extensions::*; mod features; pub use features::*; mod prelude; diff --git a/generator/src/lib.rs b/generator/src/lib.rs index 1d92a35..67af12d 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -566,7 +566,7 @@ pub trait CommandExt { impl CommandExt for vk_parse::CommandDefinition { fn function_type(&self) -> FunctionType { - let is_first_param_device = self.params.get(0).map_or(false, |field| { + let is_first_param_device = self.params.first().map_or(false, |field| { matches!( field.definition.type_name.as_deref(), Some("VkDevice" | "VkCommandBuffer" | "VkQueue")