diff options
Diffstat (limited to 'src/voice')
| -rw-r--r-- | src/voice/audio.rs | 2 | ||||
| -rw-r--r-- | src/voice/streamer.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/voice/audio.rs b/src/voice/audio.rs index 24a4fcd..21f8f31 100644 --- a/src/voice/audio.rs +++ b/src/voice/audio.rs @@ -24,7 +24,7 @@ pub trait AudioReceiver: Send { data: &[i16]); } -#[derive(Clone)] +#[derive(Clone, Copy)] pub enum AudioType { Opus, Pcm, diff --git a/src/voice/streamer.rs b/src/voice/streamer.rs index 99be4de..a0334f3 100644 --- a/src/voice/streamer.rs +++ b/src/voice/streamer.rs @@ -25,7 +25,7 @@ struct InputSource<R: Read + Send + 'static> { impl<R: Read + Send> AudioSource for InputSource<R> { fn is_stereo(&mut self) -> bool { self.stereo } - fn get_type(&self) -> AudioType { self.kind.clone() } + fn get_type(&self) -> AudioType { self.kind } fn read_pcm_frame(&mut self, buffer: &mut [i16]) -> Option<usize> { for (i, v) in buffer.iter_mut().enumerate() { |