From 017a1a623205468250b66c7c0b8bb790c37e0b9d Mon Sep 17 00:00:00 2001 From: chyyran Date: Fri, 16 Feb 2024 00:38:28 -0500 Subject: [PATCH] fmt: clean up imports and features --- Cargo.lock | 10 +++++----- librashader-reflect/src/front/glslang.rs | 2 +- librashader-reflect/src/reflect/naga/mod.rs | 1 - .../reflect/naga/spirv_passes/link_input_outputs.rs | 5 ++--- librashader-runtime-vk/src/util.rs | 2 +- librashader-runtime-vk/tests/hello_triangle/util.rs | 4 ++-- librashader-runtime-wgpu/src/lib.rs | 1 - 7 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 402ed2d..ba053f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,9 +37,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "42cd52102d3df161c77a887b608d7a4897d7cc112886a9537b738a887a03aaff" dependencies = [ "cfg-if", "getrandom", @@ -1235,7 +1235,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.8", ] [[package]] @@ -1244,7 +1244,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.8", "allocator-api2", ] @@ -3683,7 +3683,7 @@ version = "0.29.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c824f11941eeae66ec71111cc2674373c772f482b58939bb4066b642aa2ffcf" dependencies = [ - "ahash 0.8.7", + "ahash 0.8.8", "android-activity", "atomic-waker", "bitflags 2.4.2", diff --git a/librashader-reflect/src/front/glslang.rs b/librashader-reflect/src/front/glslang.rs index 742f9a7..e552484 100644 --- a/librashader-reflect/src/front/glslang.rs +++ b/librashader-reflect/src/front/glslang.rs @@ -1,5 +1,5 @@ use crate::error::ShaderCompileError; -use glslang::{CompilerOptions, ShaderInput, ShaderOptions}; +use glslang::{CompilerOptions, ShaderInput}; use librashader_preprocess::ShaderSource; use crate::front::{ShaderInputCompiler, SpirvCompilation}; diff --git a/librashader-reflect/src/reflect/naga/mod.rs b/librashader-reflect/src/reflect/naga/mod.rs index f4e725b..666ff77 100644 --- a/librashader-reflect/src/reflect/naga/mod.rs +++ b/librashader-reflect/src/reflect/naga/mod.rs @@ -4,7 +4,6 @@ mod spirv_passes; pub mod wgsl; use crate::error::{SemanticsErrorKind, ShaderReflectError}; -use bitflags::Flags; use crate::front::SpirvCompilation; use naga::{ diff --git a/librashader-reflect/src/reflect/naga/spirv_passes/link_input_outputs.rs b/librashader-reflect/src/reflect/naga/spirv_passes/link_input_outputs.rs index f1a91fa..770fe04 100644 --- a/librashader-reflect/src/reflect/naga/spirv_passes/link_input_outputs.rs +++ b/librashader-reflect/src/reflect/naga/spirv_passes/link_input_outputs.rs @@ -68,11 +68,10 @@ impl<'a> LinkInputs<'a> { } } - let mut val = Self { + Self { frag_builder: frag, inputs, - }; - val + } } pub fn do_pass(&mut self) { diff --git a/librashader-runtime-vk/src/util.rs b/librashader-runtime-vk/src/util.rs index 2f51475..fa8832b 100644 --- a/librashader-runtime-vk/src/util.rs +++ b/librashader-runtime-vk/src/util.rs @@ -1,9 +1,9 @@ use ash::vk; use gpu_allocator::vulkan::{Allocator, AllocatorCreateDesc}; +use gpu_allocator::AllocationSizes; use parking_lot::RwLock; use std::sync::Arc; -use gpu_allocator::AllocationSizes; use crate::error; use crate::error::FilterChainError; diff --git a/librashader-runtime-vk/tests/hello_triangle/util.rs b/librashader-runtime-vk/tests/hello_triangle/util.rs index fdd35bd..9792033 100644 --- a/librashader-runtime-vk/tests/hello_triangle/util.rs +++ b/librashader-runtime-vk/tests/hello_triangle/util.rs @@ -1,9 +1,9 @@ use ash::vk; use gpu_allocator::vulkan::{Allocator, AllocatorCreateDesc}; +use gpu_allocator::AllocationSizes; use parking_lot::RwLock; use std::sync::Arc; -use gpu_allocator::AllocationSizes; #[inline(always)] pub unsafe fn vulkan_image_layout_transition_levels( @@ -57,7 +57,7 @@ pub fn create_allocator( physical_device, debug_settings: Default::default(), buffer_device_address: false, - allocation_sizes: AllocationSizes::default() + allocation_sizes: AllocationSizes::default(), }) .unwrap(); Arc::new(RwLock::new(alloc)) diff --git a/librashader-runtime-wgpu/src/lib.rs b/librashader-runtime-wgpu/src/lib.rs index 61be618..7eb1cec 100644 --- a/librashader-runtime-wgpu/src/lib.rs +++ b/librashader-runtime-wgpu/src/lib.rs @@ -5,7 +5,6 @@ #![deny(unsafe_op_in_unsafe_fn)] #![feature(type_alias_impl_trait)] #![feature(let_chains)] -#![feature(strict_provenance)] mod buffer; mod draw_quad;