From fdcf44e1463e708cd8b612c183e302db9af0febd Mon Sep 17 00:00:00 2001 From: Leah Date: Fri, 23 Mar 2018 13:54:12 +0100 Subject: Change the way ids and some enums are made (#295) This makes them easier to be found by tools like rls. Also update struct inits to use the shorthand version for `x: x`. --- src/voice/connection.rs | 10 +++++----- src/voice/handler.rs | 16 ++++++++-------- src/voice/manager.rs | 4 ++-- src/voice/streamer.rs | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/voice') diff --git a/src/voice/connection.rs b/src/voice/connection.rs index a98dbc7..d447d5c 100644 --- a/src/voice/connection.rs +++ b/src/voice/connection.rs @@ -575,10 +575,10 @@ fn start_threads(client: Arc>, udp: &UdpSocket) -> Result, user_id: UserId) -> Manager { Manager { handlers: HashMap::new(), - user_id: user_id, - ws: ws, + user_id, + ws, } } diff --git a/src/voice/streamer.rs b/src/voice/streamer.rs index c5954c8..3265fb6 100644 --- a/src/voice/streamer.rs +++ b/src/voice/streamer.rs @@ -163,7 +163,7 @@ pub fn dca>(path: P) -> StdResult, DcaError> { pub fn opus(is_stereo: bool, reader: R) -> Box { Box::new(InputSource { stereo: is_stereo, - reader: reader, + reader, kind: AudioType::Opus, }) } @@ -172,7 +172,7 @@ pub fn opus(is_stereo: bool, reader: R) -> Box(is_stereo: bool, reader: R) -> Box { Box::new(InputSource { stereo: is_stereo, - reader: reader, + reader, kind: AudioType::Pcm, }) } -- cgit v1.2.3