From 1f202d7dc859bf91f6d02011af36cc15e3008c20 Mon Sep 17 00:00:00 2001 From: peamaeq Date: Thu, 23 Jun 2022 17:24:09 +0800 Subject: [PATCH] Shrink unsafe blocks --- src/api/vst2/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/vst2/mod.rs b/src/api/vst2/mod.rs index af2d0f5..a9a3f0c 100644 --- a/src/api/vst2/mod.rs +++ b/src/api/vst2/mod.rs @@ -247,8 +247,8 @@ impl VST2Adapter

{ let (width, height) = match self.ui_get_rect() { Some((w, h)) => (w, h), - None => unsafe { - *ptr = ptr::null_mut(); + None => { + unsafe { *ptr = ptr::null_mut() }; return 0; } }; @@ -263,9 +263,9 @@ impl VST2Adapter

{ unsafe { // we never read from editor_rect, just set it. *ptr = (&self.editor_rect as *const _) as *mut c_void; - return 1; } - }, + return 1; + } effect_opcodes::EDIT_OPEN => { return match self.ui_open(ptr) {