From e36fd1788d9adbb86757c5b3c8c64449b7c9f0d2 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 9 Apr 2018 21:58:47 +0200 Subject: [PATCH] Fix some more unconstrained types in msg_send results (#453) The error I was investigating https://github.com/servo/servo/pull/20474#issuecomment-379802897 turned out to be already be fixed by https://github.com/tomaka/winit/pull/428, but there was a few more cases of the same problem. --- CHANGELOG.md | 1 + src/platform/macos/window.rs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79f665a9..435f0614 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Unreleased - Overhauled X11 window geometry calculations. `get_position` and `set_position` are more universally accurate across different window managers, and `get_outer_size` actually works now. +- Fixed SIGSEGV/SIGILL crashes on macOS caused by stabilization of the `!` (never) type. # Version 0.12.0 (2018-04-06) diff --git a/src/platform/macos/window.rs b/src/platform/macos/window.rs index 04e26dc4..9ade104b 100644 --- a/src/platform/macos/window.rs +++ b/src/platform/macos/window.rs @@ -470,13 +470,13 @@ impl Window2 { } if pl_attrs.titlebar_buttons_hidden { let button = window.standardWindowButton_(NSWindowButton::NSWindowFullScreenButton); - msg_send![button, setHidden:YES]; + let () = msg_send![button, setHidden:YES]; let button = window.standardWindowButton_(NSWindowButton::NSWindowMiniaturizeButton); - msg_send![button, setHidden:YES]; + let () = msg_send![button, setHidden:YES]; let button = window.standardWindowButton_(NSWindowButton::NSWindowCloseButton); - msg_send![button, setHidden:YES]; + let () = msg_send![button, setHidden:YES]; let button = window.standardWindowButton_(NSWindowButton::NSWindowZoomButton); - msg_send![button, setHidden:YES]; + let () = msg_send![button, setHidden:YES]; } if pl_attrs.movable_by_window_background { window.setMovableByWindowBackground_(YES);