Remove redundant unsafe
@@ -179,7 +179,6 @@ unsafe fn winit_to_surface(instance: Arc<Instance>, win: &winit::Window)
-> Result<Arc<Surface>, SurfaceCreationError> {
use winit::os::macos::WindowExt;
- unsafe {
let wnd: cocoa_id = mem::transmute(win.get_nswindow());
let layer = CAMetalLayer::new();
@@ -191,7 +190,6 @@ unsafe fn winit_to_surface(instance: Arc<Instance>, win: &winit::Window)
let view = wnd.contentView();
view.setWantsLayer(YES);
view.setLayer(mem::transmute(layer.0)); // Bombs here with out of memory
- }
Surface::from_macos_moltenvk(instance, win.get_nsview() as *const ())
}
