aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-01-30 17:17:58 -0800
committerZeyla Hellyer <[email protected]>2018-02-04 07:54:31 -0800
commit5f3c03f891821139e320b007ce474da800181e3c (patch)
tree4ec460133bc9236caf092ac9bbd8eefe7d4d2899 /src
parentMake MessageUpdateEvent::embeds a Vec<Embed> (diff)
downloadserenity-5f3c03f891821139e320b007ce474da800181e3c.tar.xz
serenity-5f3c03f891821139e320b007ce474da800181e3c.zip
Remove an `Into<Option<T>>`
Technically a bugfix because this made it sort of unusable; instead, users need to explicitly `Some(Box::new(receiver))`.
Diffstat (limited to 'src')
-rw-r--r--src/voice/handler.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/voice/handler.rs b/src/voice/handler.rs
index d4085d5..c3a5f05 100644
--- a/src/voice/handler.rs
+++ b/src/voice/handler.rs
@@ -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.