File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ struct InputCallback {
8989
9090
9191macro_rules! try_os_status {
92- ( $expr: expr) => ( try! ( Error :: from_os_status( $expr) ) )
92+ ( $expr: expr) => ( Error :: from_os_status( $expr) ? )
9393}
9494
9595
@@ -290,7 +290,7 @@ impl AudioUnit {
290290 /// Return the current Stream Format for the AudioUnit.
291291 pub fn stream_format ( & self , scope : Scope ) -> Result < StreamFormat , Error > {
292292 let id = sys:: kAudioUnitProperty_StreamFormat;
293- let asbd = try! ( self . get_property ( id, scope, Element :: Output ) ) ;
293+ let asbd = self . get_property ( id, scope, Element :: Output ) ? ;
294294 StreamFormat :: from_asbd ( asbd)
295295 }
296296
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ pub use self::data::Data;
1414///
1515/// This allows the user to provide a custom, more rust-esque callback function type that takes
1616/// greater advantage of rust's type safety.
17- pub type InputProcFn = FnMut ( * mut sys:: AudioUnitRenderActionFlags ,
17+ pub type InputProcFn = dyn FnMut ( * mut sys:: AudioUnitRenderActionFlags ,
1818 * const sys:: AudioTimeStamp ,
1919 sys:: UInt32 ,
2020 sys:: UInt32 ,
@@ -398,7 +398,7 @@ impl AudioUnit {
398398 // First, we'll retrieve the stream format so that we can ensure that the given callback
399399 // format matches the audio unit's format.
400400 let id = sys:: kAudioUnitProperty_StreamFormat;
401- let asbd = try! ( self . get_property ( id, Scope :: Input , Element :: Output ) ) ;
401+ let asbd = self . get_property ( id, Scope :: Input , Element :: Output ) ? ;
402402 let stream_format = super :: StreamFormat :: from_asbd ( asbd) ?;
403403
404404 // If the stream format does not match, return an error indicating this.
You can’t perform that action at this time.
0 commit comments