Skip to content

Commit 4c0b453

Browse files
committed
[fix] redunant clamping
1 parent aec8514 commit 4c0b453

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

crates/lambda-rs-platform/src/wgpu/texture.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -664,10 +664,8 @@ impl SamplerBuilder {
664664
max_supported_anisotropy: u16,
665665
) -> wgpu::SamplerDescriptor<'_> {
666666
let max_supported_anisotropy = max_supported_anisotropy.clamp(1, 16);
667-
let mut anisotropy_clamp = self
668-
.anisotropy_clamp
669-
.clamp(1, 16)
670-
.min(max_supported_anisotropy);
667+
let mut anisotropy_clamp =
668+
self.anisotropy_clamp.min(max_supported_anisotropy);
671669
if anisotropy_clamp > 1
672670
&& !matches!(
673671
(self.min_filter, self.mag_filter, self.mipmap_filter),

0 commit comments

Comments
 (0)