Work around a clippy error (#3505)

This commit is contained in:
Nicolas Silva
2023-02-20 15:35:58 +01:00
committed by GitHub
parent e18520078a
commit 8f1db56fc0
2 changed files with 5 additions and 2 deletions

View File

@@ -485,8 +485,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
id.0
}
/// # Safety
///
/// `layer` must be a valid pointer.
#[cfg(feature = "metal")]
pub fn instance_create_surface_metal(
pub unsafe fn instance_create_surface_metal(
&self,
layer: *mut std::ffi::c_void,
id_in: Input<G, SurfaceId>,

View File

@@ -195,7 +195,7 @@ impl Context {
&self,
layer: *mut std::ffi::c_void,
) -> Surface {
let id = self.0.instance_create_surface_metal(layer, ());
let id = unsafe { self.0.instance_create_surface_metal(layer, ()) };
Surface {
id,
configured_device: Mutex::default(),