Closed oluseyi closed 7 years ago
@bors-servo: r+
:pushpin: Commit 135fce2 has been approved by jdm
:hourglass: Testing commit 135fce23857e5f6a85209d8f20a72a21f9aa5475 with merge 31d8ba22dca7c2510fce2d811b2e1bed34bc7844...
:broken_heart: Test failed - status-travis
Example needs to be updated now:
error[E0308]: mismatched types
--> examples/hello_world.rs:40:59
|
40 | NSTitledWindowMask as NSUInteger,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `cocoa::appkit::NSWindowStyleMask`, found u64
|
= note: expected type `cocoa::appkit::NSWindowStyleMask`
found type `u64`
error: non-scalar cast: `cocoa::appkit::NSWindowStyleMask` as `u64`
--> examples/hello_world.rs:40:59
|
40 | NSTitledWindowMask as NSUInteger,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
error: Could not compile `cocoa`.
Yeah, saw the message from bors-servo. Was at lunch; committing now. Thanks @jdm.
@bors-servo: r+
:pushpin: Commit e773703 has been approved by jdm
:hourglass: Testing commit e773703bb5961f4ccc29bbd5f8797050bdc4459e with merge 4c63ce7a7115c415dcb62ece2e495f86d65e24c8...
:sunny: Test successful - status-travis Approved by: jdm Pushing 4c63ce7a7115c415dcb62ece2e495f86d65e24c8 to master...
RE https://github.com/servo/cocoa-rs/issues/159
NSWindowStyleMask
, as an enumeration in Objective-C, degrades toNSUInteger
and is therefore bitwise-combinable, though it loses type information. Instead of implementingNSWindowStyleMask
as a packed-data object with au64
representational form, we ought to employ bit flags to generate a strong type that remains combinable in the manner Cocoa programmers are accustomed to. Also easier than manually implementingstd::ops::BitOr
for the type.This change is