Fix warnings (#1020)

* Windows: Fix warning

* iOS: Fix warning
This commit is contained in:
Felix Rabe 2019-07-07 22:12:39 +02:00 committed by Hal Gentz
parent 28775be115
commit f874d76289
2 changed files with 3 additions and 7 deletions

View file

@ -1,7 +1,7 @@
use std::{ use std::{
collections::VecDeque, collections::VecDeque,
ffi::c_void, ffi::c_void,
fmt::{self, Debug, Formatter}, fmt::{self, Debug},
marker::PhantomData, marker::PhantomData,
mem, ptr, mem, ptr,
sync::mpsc::{self, Receiver, Sender}, sync::mpsc::{self, Receiver, Sender},

View file

@ -1,10 +1,6 @@
#![allow(non_snake_case, unused_unsafe)] #![allow(non_snake_case, unused_unsafe)]
use std::{ use std::{mem, os::raw::c_void, sync::Once};
mem,
os::raw::c_void,
sync::{Once, ONCE_INIT},
};
use winapi::{ use winapi::{
shared::{ shared::{
@ -79,7 +75,7 @@ pub fn become_dpi_aware(enable: bool) {
if !enable { if !enable {
return; return;
} }
static ENABLE_DPI_AWARENESS: Once = ONCE_INIT; static ENABLE_DPI_AWARENESS: Once = Once::new();
ENABLE_DPI_AWARENESS.call_once(|| { ENABLE_DPI_AWARENESS.call_once(|| {
unsafe { unsafe {
if let Some(SetProcessDpiAwarenessContext) = if let Some(SetProcessDpiAwarenessContext) =