From 3c0d5f93a290d274d5bca75ea7d5f1d8c6cd6d84 Mon Sep 17 00:00:00 2001 From: cactter Date: Fri, 22 Jul 2022 00:00:07 +0800 Subject: [PATCH] Shrink unsafe block --- src/gl/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gl/mod.rs b/src/gl/mod.rs index b2730355..bcc1ac13 100644 --- a/src/gl/mod.rs +++ b/src/gl/mod.rs @@ -813,8 +813,8 @@ pub const DEPTH_ATTACHMENT: Attachment = gl::DEPTH_ATTACHMENT; pub struct Framebuffer(glow::Framebuffer); pub fn check_framebuffer_status() { - unsafe { - let status = glow_context().check_framebuffer_status(gl::FRAMEBUFFER); + + let status = unsafe { glow_context().check_framebuffer_status(gl::FRAMEBUFFER) }; let s = match status { gl::FRAMEBUFFER_UNDEFINED => "GL_FRAMEBUFFER_UNDEFINED", gl::FRAMEBUFFER_INCOMPLETE_ATTACHMENT => "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT", @@ -838,7 +838,7 @@ pub fn check_framebuffer_status() { status, s ); } - } + } pub fn check_gl_error() {