diff --git a/librashader-capi/src/error.rs b/librashader-capi/src/error.rs index c56dfa0..78462c9 100644 --- a/librashader-capi/src/error.rs +++ b/librashader-capi/src/error.rs @@ -223,14 +223,14 @@ macro_rules! assert_some_ptr { return $crate::error::LibrashaderError::InvalidParameter(stringify!($value)).export(); } - let $value = unsafe { $value.as_ref().unwrap().as_ref() }; + let $value = unsafe { $value.as_ref().unwrap_unchecked().as_ref() }; }; (mut $value:ident) => { if $value.is_none() { return $crate::error::LibrashaderError::InvalidParameter(stringify!($value)).export(); } - let $value = unsafe { $value.as_mut().unwrap().as_mut() }; + let $value = unsafe { $value.as_mut().unwrap_unchecked().as_mut() }; }; } diff --git a/librashader-runtime-d3d12/src/samplers.rs b/librashader-runtime-d3d12/src/samplers.rs index cf5b9c4..f92ff99 100644 --- a/librashader-runtime-d3d12/src/samplers.rs +++ b/librashader-runtime-d3d12/src/samplers.rs @@ -1,4 +1,3 @@ -use std::iter::Filter; use crate::descriptor_heap::{D3D12DescriptorHeap, D3D12DescriptorHeapSlot, SamplerPaletteHeap}; use crate::error; use librashader_common::{FilterMode, WrapMode};