Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oisyn committed Apr 12, 2023
1 parent bcc0939 commit 6b3436f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/spirv-std/macros/src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl Parse for ImageType {
let value = value.unwrap();
set_unique!(
components = match value.base10_parse() {
Ok(n) if n >= 1 && n <= 4 => n,
Ok(n) if (1..=4).contains(&n) => n,
_ =>
return Err(syn::Error::new(
value.span(),
Expand Down
9 changes: 3 additions & 6 deletions crates/spirv-std/src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ pub use spirv_std_types::image_params::{
AccessQualifier, Arrayed, Dimensionality, ImageDepth, ImageFormat, Multisampled, Sampled,
};

use crate::{
float::Float,
integer::Integer,
vector::{Vector, VectorTruncateInto},
Sampler,
};
#[cfg(target = "spirv")]
use crate::vector::VectorTruncateInto;
use crate::{float::Float, integer::Integer, vector::Vector, Sampler};

/// Re-export of primitive types to ensure the `Image` proc macro always points
/// to the right type.
Expand Down

0 comments on commit 6b3436f

Please sign in to comment.