Use class macro (#605)

This commit is contained in:
Josh Groves 2018-07-19 10:02:33 -06:00 committed by Francesca Frangipane
parent 0cb5450999
commit 7ee46d80e6
8 changed files with 30 additions and 37 deletions

View file

@ -180,7 +180,7 @@ impl EventsLoop {
where F: FnMut(Event),
{
unsafe {
if !msg_send![cocoa::base::class("NSThread"), isMainThread] {
if !msg_send![class!(NSThread), isMainThread] {
panic!("Events can only be polled from the main thread on macOS");
}
}
@ -221,7 +221,7 @@ impl EventsLoop {
where F: FnMut(Event) -> ControlFlow
{
unsafe {
if !msg_send![cocoa::base::class("NSThread"), isMainThread] {
if !msg_send![class!(NSThread), isMainThread] {
panic!("Events can only be polled from the main thread on macOS");
}
}