diff --git a/src/backend/winmm/handler.rs b/src/backend/winmm/handler.rs index e930c2b..288c68d 100644 --- a/src/backend/winmm/handler.rs +++ b/src/backend/winmm/handler.rs @@ -1,12 +1,12 @@ use std::{mem, slice}; -use std::io::{Write, stderr}; +use std::io::{Write, stderr}; use super::winapi::shared::basetsd::DWORD_PTR; use super::winapi::shared::minwindef::{DWORD, UINT}; use super::winapi::um::mmeapi::*; use super::winapi::um::mmsystem::*; use super::HandlerData; -use ::Ignore; +use Ignore; pub extern "system" fn handle_input(_: HMIDIIN, input_status: UINT, diff --git a/src/backend/winmm/mod.rs b/src/backend/winmm/mod.rs index d5b99f4..0fd9bda 100644 --- a/src/backend/winmm/mod.rs +++ b/src/backend/winmm/mod.rs @@ -4,7 +4,7 @@ use std::{mem, ptr, slice}; use std::ffi::OsString; use std::os::windows::ffi::OsStringExt; use std::sync::Mutex; -use std::io::{stderr, Write}; +use std::io::{Write, stderr}; use std::thread::sleep; use std::time::Duration; use memalloc::{allocate, deallocate}; @@ -12,45 +12,19 @@ use memalloc::{allocate, deallocate}; use self::winapi::shared::basetsd::{DWORD_PTR, UINT_PTR}; use self::winapi::shared::minwindef::{DWORD, UINT}; -use self::winapi::um::mmeapi::{ - midiInGetNumDevs, - midiInGetDevCapsW, - midiInOpen, - midiInStart, - midiInClose, - midiInReset, - midiInStop, - midiInAddBuffer, - midiInPrepareHeader, - midiInUnprepareHeader, - midiOutGetNumDevs, - midiOutGetDevCapsW, - midiOutOpen, - midiOutReset, - midiOutClose, - midiOutPrepareHeader, - midiOutUnprepareHeader, - midiOutLongMsg, - midiOutShortMsg, -}; +use self::winapi::um::mmeapi::{midiInAddBuffer, midiInClose, midiInGetDevCapsW, midiInGetNumDevs, + midiInOpen, midiInPrepareHeader, midiInReset, midiInStart, + midiInStop, midiInUnprepareHeader, midiOutClose, + midiOutGetDevCapsW, midiOutGetNumDevs, midiOutLongMsg, midiOutOpen, + midiOutPrepareHeader, midiOutReset, midiOutShortMsg, + midiOutUnprepareHeader}; -use self::winapi::um::mmsystem::{ - HMIDIIN, - HMIDIOUT, - MIDIINCAPSW, - MIDIOUTCAPSW, - MMSYSERR_NOERROR, - MMSYSERR_BADDEVICEID, - MIDIERR_NOTREADY, - MIDIERR_STILLPLAYING, - CALLBACK_FUNCTION, - MIDIHDR, - LPMIDIHDR, - CALLBACK_NULL -}; +use self::winapi::um::mmsystem::{CALLBACK_FUNCTION, CALLBACK_NULL, HMIDIIN, HMIDIOUT, LPMIDIHDR, + MIDIERR_NOTREADY, MIDIERR_STILLPLAYING, MIDIHDR, MIDIINCAPSW, + MIDIOUTCAPSW, MMSYSERR_BADDEVICEID, MMSYSERR_NOERROR}; -use ::{MidiMessage, Ignore}; -use ::errors::*; +use {Ignore, MidiMessage}; +use errors::*; mod handler;