Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes so the compiler can infer msg_send! return types #340

Merged
merged 1 commit into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions cocoa/src/appkit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ pub trait NSPasteboard: Sized {

impl NSPasteboard for id {
unsafe fn releaseGlobally(self) {
msg_send![self, releaseGlobally];
msg_send![self, releaseGlobally]
}

unsafe fn clearContents(self) -> NSInteger {
Expand Down Expand Up @@ -1547,11 +1547,11 @@ impl NSWindow for id {
}

unsafe fn setTabbingMode_(self, tabbingMode: NSWindowTabbingMode) {
msg_send![self, setTabbingMode: tabbingMode];
msg_send![self, setTabbingMode: tabbingMode]
}

unsafe fn addTabbedWindow_ordered_(self, window: id, ordering_mode: NSWindowOrderingMode) {
msg_send![self, addTabbedWindow:window ordered: ordering_mode];
msg_send![self, addTabbedWindow:window ordered: ordering_mode]
}

unsafe fn toggleTabBar_(self, sender: id) {
Expand Down Expand Up @@ -2977,7 +2977,7 @@ impl NSButton for id {
msg_send![self, initWithFrame:frameRect]
}
unsafe fn setBezelStyle_(self, style: NSBezelStyle) {
msg_send![self, setBezelStyle:style];
msg_send![self, setBezelStyle:style]
}
unsafe fn setTitle_(self, title: id /* (NSString*) */) {
msg_send![self, setTitle:title]
Expand All @@ -2990,7 +2990,7 @@ impl NSButton for id {
}

unsafe fn setAction_(self, selector: objc::runtime::Sel /* (Instance method *) */) {
msg_send![self, setAction:selector];
msg_send![self, setAction:selector]
}
}

Expand Down Expand Up @@ -3589,10 +3589,10 @@ impl NSTextField for id {
msg_send![self, initWithFrame:frameRect]
}
unsafe fn setEditable_(self, editable: BOOL) {
msg_send![self, setEditable:editable];
msg_send![self, setEditable:editable]
}
unsafe fn setStringValue_(self, label: id) {
msg_send![self, setStringValue:label];
msg_send![self, setStringValue:label]
}
}

Expand Down
4 changes: 2 additions & 2 deletions cocoa/src/quartzcore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ impl CALayer {
#[inline]
pub fn set_should_rasterize(&self, flag: bool) {
unsafe {
msg_send![self.id(), setShouldRasterize:(flag as BOOL)];
msg_send![self.id(), setShouldRasterize:(flag as BOOL)]
}
}

Expand Down Expand Up @@ -1459,7 +1459,7 @@ impl CARenderer {
Some(ref layer) => layer.id(),
None => nil,
};
msg_send![self.id(), setLayer:layer];
msg_send![self.id(), setLayer:layer]
}
}

Expand Down
2 changes: 1 addition & 1 deletion cocoa/tests/foundation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ mod foundation {
let mut_components: id = msg_send![components, mutableCopy];
let mut iter = mut_components.iter();
iter.next();
msg_send![mut_components, removeObjectAtIndex:1];
let () = msg_send![mut_components, removeObjectAtIndex:1];
iter.next();
}
}
Expand Down