diff options
| author | Zeyla Hellyer <[email protected]> | 2018-01-30 17:17:58 -0800 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2018-01-30 17:17:58 -0800 |
| commit | eee3168b4ed266001571abe4e1a6ae4ef06b93e0 (patch) | |
| tree | 021fbcb9b360e947ca33ff147674a1da8931a71d /src | |
| parent | Reduce number of clones in the library (diff) | |
| download | serenity-eee3168b4ed266001571abe4e1a6ae4ef06b93e0.tar.xz serenity-eee3168b4ed266001571abe4e1a6ae4ef06b93e0.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.rs | 4 |
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. |