Skip to content

Commit

Permalink
Apply rustfmt to some imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Boddlnagg committed Dec 8, 2017
1 parent 3dc18a2 commit 87efc53
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 40 deletions.
4 changes: 2 additions & 2 deletions src/backend/winmm/handler.rs
Original file line number Diff line number Diff line change
@@ -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<T>(_: HMIDIIN,
input_status: UINT,
Expand Down
50 changes: 12 additions & 38 deletions src/backend/winmm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,27 @@ 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};

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;

Expand Down

0 comments on commit 87efc53

Please sign in to comment.