Browse Source

cargo fmt

pull/83/head
Andrea Ciliberti 2 years ago
parent
commit
50a7e02779
  1. 4
      ctru-rs/src/services/ndsp/mod.rs
  2. 4
      ctru-rs/src/services/ndsp/wave.rs

4
ctru-rs/src/services/ndsp/mod.rs

@ -210,9 +210,7 @@ impl Channel<'_> {
/// To ensure safety, checks within [WaveInfo] will clear the whole channel queue if any queued [WaveInfo] is dropped prematurely. /// To ensure safety, checks within [WaveInfo] will clear the whole channel queue if any queued [WaveInfo] is dropped prematurely.
pub fn queue_wave(&self, wave: &mut WaveInfo) -> std::result::Result<(), NdspError> { pub fn queue_wave(&self, wave: &mut WaveInfo) -> std::result::Result<(), NdspError> {
match wave.get_status() { match wave.get_status() {
WaveStatus::Playing | WaveStatus::Queued => { WaveStatus::Playing | WaveStatus::Queued => return Err(NdspError::WaveBusy(self.id)),
return Err(NdspError::WaveBusy(self.id))
}
_ => (), _ => (),
} }

4
ctru-rs/src/services/ndsp/wave.rs

@ -97,9 +97,7 @@ impl WaveInfo {
pub fn set_sample_count(&mut self, sample_count: u32) -> Result<(), NdspError> { pub fn set_sample_count(&mut self, sample_count: u32) -> Result<(), NdspError> {
match self.get_status() { match self.get_status() {
WaveStatus::Playing | WaveStatus::Queued => { WaveStatus::Playing | WaveStatus::Queued => {
return Err(NdspError::WaveBusy( return Err(NdspError::WaveBusy(self.played_on_channel.unwrap()));
self.played_on_channel.unwrap(),
));
} }
_ => (), _ => (),
} }

Loading…
Cancel
Save