Skip to content
This repository was archived by the owner on May 28, 2022. It is now read-only.

Commit 13ca2ee

Browse files
committed
Add explicit () return types for msg_send!
`msg_send!` with an unconstrained return type used to be deduced to have the return type `()`. This is no longer the case after the stabilization of the `!` (never) type (rust-lang/rust#48950), and it'll be deduced to be `!`. This commit adds explicit return types to preserve the old behavior.
1 parent e6e2e30 commit 13ca2ee

File tree

3 files changed

+7
-7
lines changed
  • NGSEngine/src
    • ngsgfx/src
    • zangfx/src/backend/metal/src/metal-rs/src

3 files changed

+7
-7
lines changed

NGSEngine/src/ngsgfx/src/backend/metal/src/metal-rs/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,13 @@ impl CAMetalLayer {
274274

275275
pub fn set_presents_with_transaction(&self, transaction: bool) {
276276
unsafe {
277-
msg_send![self.0, setPresentsWithTransaction:transaction];
277+
msg_send![self.0, setPresentsWithTransaction:transaction]
278278
}
279279
}
280280

281281
pub fn set_framebuffer_only(&self, framebuffer_only: bool) {
282282
unsafe {
283-
msg_send![self.0, setFramebufferOnly:framebuffer_only];
283+
msg_send![self.0, setFramebufferOnly:framebuffer_only]
284284
}
285285
}
286286

@@ -304,7 +304,7 @@ impl CAMetalLayer {
304304

305305
pub fn remove_all_animations(&self) {
306306
unsafe {
307-
msg_send![self.0, removeAllAnimations];
307+
msg_send![self.0, removeAllAnimations]
308308
}
309309
}
310310

NGSEngine/src/ngsgfx/src/wsi/metal/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ impl wsi_core::NewWindow for MetalWindow {
233233

234234
let ns_cs_name = NSString::alloc(ptr::null_mut()).init_str(cs_name);
235235
let colorspace = CGColorSpaceCreateWithName(mem::transmute(ns_cs_name));
236-
msg_send![ns_cs_name, release];
236+
let () = msg_send![ns_cs_name, release];
237237

238238
layer.set_edge_antialiasing_mask(0);
239239
layer.set_masks_to_bounds(true);

NGSEngine/src/zangfx/src/backend/metal/src/metal-rs/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,13 @@ impl CAMetalLayer {
274274

275275
pub fn set_presents_with_transaction(&self, transaction: bool) {
276276
unsafe {
277-
msg_send![self.0, setPresentsWithTransaction:transaction];
277+
msg_send![self.0, setPresentsWithTransaction:transaction]
278278
}
279279
}
280280

281281
pub fn set_framebuffer_only(&self, framebuffer_only: bool) {
282282
unsafe {
283-
msg_send![self.0, setFramebufferOnly:framebuffer_only];
283+
msg_send![self.0, setFramebufferOnly:framebuffer_only]
284284
}
285285
}
286286

@@ -304,7 +304,7 @@ impl CAMetalLayer {
304304

305305
pub fn remove_all_animations(&self) {
306306
unsafe {
307-
msg_send![self.0, removeAllAnimations];
307+
msg_send![self.0, removeAllAnimations]
308308
}
309309
}
310310

0 commit comments

Comments
 (0)