From f33a372ef62e337ff141c76f3ec9b6c2a5077630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Sun, 20 Jun 2021 02:10:16 +0200 Subject: review --- mumd/src/audio/sound_effects.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mumd/src/audio') diff --git a/mumd/src/audio/sound_effects.rs b/mumd/src/audio/sound_effects.rs index 205b3f7..63f08bd 100644 --- a/mumd/src/audio/sound_effects.rs +++ b/mumd/src/audio/sound_effects.rs @@ -70,7 +70,6 @@ impl TryFrom<&str> for NotificationEvents { "deafen" => Ok(NotificationEvents::Deafen), "undeafen" => Ok(NotificationEvents::Undeafen), _ => { - warn!("Unknown notification event '{}' in config", s); Err(()) } } @@ -87,6 +86,7 @@ pub fn load_sound_effects(overrides: &[SoundEffect], num_channels: usize) -> Has if let Ok(event) = NotificationEvents::try_from(event.as_str()) { Some((event, file)) } else { + warn!("Unknown notification event '{}'", event); None } }) @@ -118,7 +118,7 @@ pub fn load_sound_effects(overrides: &[SoundEffect], num_channels: usize) -> Has // LRLRLR (or RLRLRL). Without this, mono audio would be played in // double speed. let iter: Box> = match spec.channels { - 1 => Box::new(samples.into_iter().flat_map(|e| vec![e, e])), + 1 => Box::new(samples.into_iter().flat_map(|e| [e, e])), 2 => Box::new(samples.into_iter()), _ => unimplemented!("Only mono and stereo sound is supported. See #80."), }; -- cgit v1.2.1