From fc208994a1e1228b79091303920fc90e066a087f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Sun, 3 Jan 2021 19:14:13 +0100 Subject: remove unused return type --- mumd/src/audio.rs | 6 ++---- mumd/src/state.rs | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'mumd/src') diff --git a/mumd/src/audio.rs b/mumd/src/audio.rs index 0e53a63..fe0ce40 100644 --- a/mumd/src/audio.rs +++ b/mumd/src/audio.rs @@ -202,11 +202,11 @@ impl Audio { user_volumes, play_sounds, }; - res.load_sound_effects(&vec![]).unwrap(); + res.load_sound_effects(&vec![]); res } - pub fn load_sound_effects(&mut self, sound_effects: &Vec) -> Result<(), ()> { + pub fn load_sound_effects(&mut self, sound_effects: &Vec) { let overrides: HashMap<_, _> = sound_effects .iter() .map(|sound_effect| { (&sound_effect.event, &sound_effect.file) }) @@ -272,8 +272,6 @@ impl Audio { (event, samples) }) .collect(); - - Ok(()) } pub fn decode_packet(&self, session_id: u32, payload: VoicePacketPayload) { diff --git a/mumd/src/state.rs b/mumd/src/state.rs index 47aef66..84247bc 100644 --- a/mumd/src/state.rs +++ b/mumd/src/state.rs @@ -574,9 +574,7 @@ impl State { self.audio.set_output_volume(output_volume); } if let Some(sound_effects) = &self.config.audio.sound_effects { - if let Err(e) = self.audio.load_sound_effects(sound_effects) { - warn!("Error loading sound effects: {:?}", e); - } + self.audio.load_sound_effects(sound_effects); } } -- cgit v1.2.1