Auto merge of #581 - michaelwright235:cfixes, r=jdm

Fix compilation warnings

We get a couple of warnings during compilation, so I've fixed them.
This commit is contained in:
bors-servo
2023-06-07 01:11:11 +02:00
committed by GitHub
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -611,7 +611,7 @@ pub trait NSString: Sized {
unsafe fn init_str(self, string: &str) -> Self;
unsafe fn UTF8String(self) -> *const libc::c_char;
unsafe fn len(self) -> usize;
unsafe fn isEqualToString(self, &str) -> bool;
unsafe fn isEqualToString(self, string: &str) -> bool;
unsafe fn substringWithRange(self, range: NSRange) -> id;
}
+2 -2
View File
@@ -2,11 +2,11 @@ extern crate cocoa;
extern crate objc;
use objc::*;
use cocoa::base::{selector, id, nil, NO};
use cocoa::base::{selector, nil, NO};
use cocoa::foundation::{NSRect, NSPoint, NSSize, NSAutoreleasePool, NSProcessInfo,
NSString};
use cocoa::appkit::{NSApp, NSColor, NSColorSpace, NSApplication, NSApplicationActivationPolicyRegular, NSMenu, NSMenuItem, NSWindowStyleMask, NSBackingStoreType, NSWindow, NSRunningApplication, NSApplicationActivateIgnoringOtherApps, NSView, NSVisualEffectMaterial, NSVisualEffectView, NSViewWidthSizable, NSViewHeightSizable, NSVisualEffectBlendingMode, NSVisualEffectState, NSWindowOrderingMode};
use cocoa::appkit::{NSApp, NSColor, NSApplication, NSApplicationActivationPolicyRegular, NSMenu, NSMenuItem, NSWindowStyleMask, NSBackingStoreType, NSWindow, NSView, NSVisualEffectMaterial, NSVisualEffectView, NSViewWidthSizable, NSViewHeightSizable, NSVisualEffectBlendingMode, NSVisualEffectState, NSWindowOrderingMode};
fn main() {
+1 -1
View File
@@ -26,7 +26,7 @@ pub type CGFloat = libc::c_double;
#[cfg(not(target_pointer_width = "64"))]
pub type CGFloat = libc::c_float;
pub type CGError = libc::int32_t;
pub type CGError = i32;
pub type CGGlyph = libc::c_ushort;
+1 -1
View File
@@ -505,7 +505,7 @@ impl<'tap_life> CGEventTap<'tap_life> {
callback_ref: Box::from_raw(cbr),
})
} else {
Box::from_raw(cbr);
let _ = Box::from_raw(cbr);
Err(())
}
}