Clippy fixes macos platform (#2133)

This commit is contained in:
Lucas Kent 2022-01-16 11:14:59 +11:00 committed by GitHub
parent cf4660841a
commit 001fb7ef60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 35 additions and 39 deletions

View file

@ -104,7 +104,7 @@ impl Cursor {
// Note that loading `busybutclickable` with this code won't animate the frames;
// instead you'll just get them all in a column.
pub unsafe fn load_webkit_cursor(cursor_name: &str) -> id {
static CURSOR_ROOT: &'static str = "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/Resources/cursors";
static CURSOR_ROOT: &str = "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/Resources/cursors";
let cursor_root = NSString::alloc(nil).init_str(CURSOR_ROOT);
let cursor_name = NSString::alloc(nil).init_str(cursor_name);
let cursor_pdf = NSString::alloc(nil).init_str("cursor.pdf");

View file

@ -68,7 +68,7 @@ impl Drop for IdRef {
impl Deref for IdRef {
type Target = id;
fn deref<'a>(&'a self) -> &'a id {
fn deref(&self) -> &id {
&self.0
}
}
@ -113,7 +113,7 @@ pub unsafe fn app_name() -> Option<id> {
}
}
pub unsafe fn superclass<'a>(this: &'a Object) -> &'a Class {
pub unsafe fn superclass(this: &Object) -> &Class {
let superclass: *const Class = msg_send![this, superclass];
&*superclass
}