Skip to content

Commit

Permalink
Remove an Into<Option<T>>
Browse files Browse the repository at this point in the history
Technically a bugfix because this made it sort of unusable; instead,
users need to explicitly `Some(Box::new(receiver))`.
  • Loading branch information
Zeyla Hellyer committed Jan 31, 2018
1 parent 13b0de1 commit eee3168
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/voice/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ impl Handler {
/// can pass in just a boxed receiver, and do not need to specify `Some`.
///
/// Pass `None` to drop the current receiver, if one exists.
pub fn listen<O: Into<Option<Box<AudioReceiver>>>>(&mut self, receiver: O) {
self.send(VoiceStatus::SetReceiver(receiver.into()))
pub fn listen(&mut self, receiver: Option<Box<AudioReceiver>>) {
self.send(VoiceStatus::SetReceiver(receiver))
}

/// Sets whether the current connection is to be muted.
Expand Down

0 comments on commit eee3168

Please sign in to comment.