From 79a2ef040bcaf4967a0e6ce6bdc0ea0f58f48e62 Mon Sep 17 00:00:00 2001 From: Zhixing Zhang Date: Tue, 15 Mar 2022 01:28:23 -0700 Subject: [PATCH] Fix `unused_unsafe` warning since Rust 1.61 nightly (#596) --- ash/src/entry.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ash/src/entry.rs b/ash/src/entry.rs index 300ae81..2247680 100644 --- a/ash/src/entry.rs +++ b/ash/src/entry.rs @@ -143,7 +143,7 @@ impl Entry { /// `static_fn` must contain valid function pointers that comply with the semantics specified by /// Vulkan 1.0, which must remain valid for at least the lifetime of the returned [`Entry`]. pub unsafe fn from_static_fn(static_fn: vk::StaticFn) -> Self { - let load_fn = |name: &std::ffi::CStr| unsafe { + let load_fn = |name: &std::ffi::CStr| { mem::transmute(static_fn.get_instance_proc_addr(vk::Instance::null(), name.as_ptr())) }; let entry_fn_1_0 = vk::EntryFnV1_0::load(load_fn);