Browse Source

Replace boolean match with a plain ol' `if-else`

master
Andreas Linz 5 years ago
parent
commit
3a259be4e8
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/stream.rs

+ 4
- 3
src/stream.rs View File

@ -312,9 +312,10 @@ impl<'a> OutStream<'a> {
}
fn stream_pause(&self, pause: bool) -> Option<ffi::enums::SioError> {
let pause_c_bool = match pause {
true => 1u8,
false => 0u8,
let pause_c_bool = if pause {
1u8
} else {
0u8
};
match unsafe { ffi::soundio_outstream_pause(self.stream, pause_c_bool) } {

Loading…
Cancel
Save