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::{
collections::VecDeque,
ffi::c_void,
fmt::{self, Debug, Formatter},
fmt::{self, Debug},
marker::PhantomData,
mem, ptr,
sync::mpsc::{self, Receiver, Sender},

View file

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