asio sys lib comments and rust fmt

This commit is contained in:
Tom Gowan 2018-11-05 11:29:28 +11:00 committed by mitchmindtree
parent f6d1a74be2
commit 72c5e9a8c1
1 changed files with 14 additions and 16 deletions

View File

@ -578,7 +578,6 @@ impl BufferCallback {
} }
} }
/// Adds a callback to the list of active callbacks /// Adds a callback to the list of active callbacks
pub fn set_callback<F: 'static>(callback: F) -> () pub fn set_callback<F: 'static>(callback: F) -> ()
where where
@ -683,8 +682,7 @@ impl AsioWrapper {
unsafe fn asio_init(&mut self, di: &mut ai::ASIODriverInfo) -> Result<(), AsioError> { unsafe fn asio_init(&mut self, di: &mut ai::ASIODriverInfo) -> Result<(), AsioError> {
if let AsioState::Loaded = self.state { if let AsioState::Loaded = self.state {
let result = ai::ASIOInit(di); let result = ai::ASIOInit(di);
asio_result!(result) asio_result!(result).map(|_| self.state = AsioState::Initialized)
.map(|_| self.state = AsioState::Initialized)
} else { } else {
Ok(()) Ok(())
} }