mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Addresses several warnings emitted on OS X by removing unused imports and allowing non_upper_case_globals in cocoa event conversion function.
This commit is contained in:
parent
e18ff88d21
commit
561349669a
|
@ -5,7 +5,6 @@ use GlProfile;
|
||||||
use GlRequest;
|
use GlRequest;
|
||||||
use PixelFormatRequirements;
|
use PixelFormatRequirements;
|
||||||
use ReleaseBehavior;
|
use ReleaseBehavior;
|
||||||
use cocoa::foundation::NSAutoreleasePool;
|
|
||||||
use cocoa::appkit::*;
|
use cocoa::appkit::*;
|
||||||
|
|
||||||
pub fn build_nsattributes<T>(pf_reqs: &PixelFormatRequirements, opengl: &GlAttributes<&T>)
|
pub fn build_nsattributes<T>(pf_reqs: &PixelFormatRequirements, opengl: &GlAttributes<&T>)
|
||||||
|
|
|
@ -7,11 +7,8 @@ use libc;
|
||||||
use ContextError;
|
use ContextError;
|
||||||
use GlAttributes;
|
use GlAttributes;
|
||||||
use GlContext;
|
use GlContext;
|
||||||
use GlProfile;
|
|
||||||
use GlRequest;
|
|
||||||
use PixelFormat;
|
use PixelFormat;
|
||||||
use PixelFormatRequirements;
|
use PixelFormatRequirements;
|
||||||
use ReleaseBehavior;
|
|
||||||
use Robustness;
|
use Robustness;
|
||||||
use WindowAttributes;
|
use WindowAttributes;
|
||||||
use native_monitor::NativeMonitorId;
|
use native_monitor::NativeMonitorId;
|
||||||
|
@ -40,7 +37,6 @@ use std::collections::VecDeque;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::str::from_utf8;
|
use std::str::from_utf8;
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
use std::ascii::AsciiExt;
|
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
|
|
||||||
use events::ElementState::{Pressed, Released};
|
use events::ElementState::{Pressed, Released};
|
||||||
|
@ -825,7 +821,7 @@ impl Clone for IdRef {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case, non_upper_case_globals)]
|
||||||
unsafe fn NSEventToEvent(window: &Window, nsevent: id) -> Option<Event> {
|
unsafe fn NSEventToEvent(window: &Window, nsevent: id) -> Option<Event> {
|
||||||
if nsevent == nil { return None; }
|
if nsevent == nil { return None; }
|
||||||
|
|
||||||
|
|
|
@ -6,16 +6,13 @@ use ContextError;
|
||||||
use CreationError;
|
use CreationError;
|
||||||
use CursorState;
|
use CursorState;
|
||||||
use Event;
|
use Event;
|
||||||
use GlAttributes;
|
|
||||||
use GlContext;
|
use GlContext;
|
||||||
use GlProfile;
|
use GlProfile;
|
||||||
use GlRequest;
|
use GlRequest;
|
||||||
use MouseCursor;
|
use MouseCursor;
|
||||||
use PixelFormat;
|
use PixelFormat;
|
||||||
use PixelFormatRequirements;
|
|
||||||
use Robustness;
|
use Robustness;
|
||||||
use Window;
|
use Window;
|
||||||
use WindowAttributes;
|
|
||||||
use WindowBuilder;
|
use WindowBuilder;
|
||||||
use native_monitor::NativeMonitorId;
|
use native_monitor::NativeMonitorId;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue