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 (backport to 0.18) #342

Merged
merged 2 commits into from
Oct 17, 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
2 changes: 1 addition & 1 deletion cocoa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name = "cocoa"
description = "Bindings to Cocoa for OS X"
homepage = "https://github.com/servo/core-foundation-rs"
repository = "https://github.com/servo/core-foundation-rs"
version = "0.18.4"
version = "0.18.5"
authors = ["The Servo Project Developers"]
license = "MIT / Apache-2.0"

Expand Down
8 changes: 4 additions & 4 deletions cocoa/src/appkit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,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 @@ -2881,7 +2881,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 Down Expand Up @@ -3486,10 +3486,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