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 {
89
89
90
90
91
91
macro_rules! try_os_status {
92
- ( $expr: expr) => ( try! ( Error :: from_os_status( $expr) ) )
92
+ ( $expr: expr) => ( Error :: from_os_status( $expr) ? )
93
93
}
94
94
95
95
@@ -290,7 +290,7 @@ impl AudioUnit {
290
290
/// Return the current Stream Format for the AudioUnit.
291
291
pub fn stream_format ( & self , scope : Scope ) -> Result < StreamFormat , Error > {
292
292
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 ) ? ;
294
294
StreamFormat :: from_asbd ( asbd)
295
295
}
296
296
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ pub use self::data::Data;
14
14
///
15
15
/// This allows the user to provide a custom, more rust-esque callback function type that takes
16
16
/// greater advantage of rust's type safety.
17
- pub type InputProcFn = FnMut ( * mut sys:: AudioUnitRenderActionFlags ,
17
+ pub type InputProcFn = dyn FnMut ( * mut sys:: AudioUnitRenderActionFlags ,
18
18
* const sys:: AudioTimeStamp ,
19
19
sys:: UInt32 ,
20
20
sys:: UInt32 ,
@@ -398,7 +398,7 @@ impl AudioUnit {
398
398
// First, we'll retrieve the stream format so that we can ensure that the given callback
399
399
// format matches the audio unit's format.
400
400
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 ) ? ;
402
402
let stream_format = super :: StreamFormat :: from_asbd ( asbd) ?;
403
403
404
404
// If the stream format does not match, return an error indicating this.
You can’t perform that action at this time.
0 commit comments