From 7b45f16f063a47dc8a302dce5b016cf43a3edcc1 Mon Sep 17 00:00:00 2001 From: Austin Hellyer Date: Fri, 16 Dec 2016 21:26:54 -0800 Subject: Make 'voice' feature not require 'cache' The voice module required the cache feature in order to access the current user's Id. Instead, just copy the Id into the VoiceManager and distribute it from there -- the memory impact will be very minimal in comparison to the benefits of not needing to constantly unlock the Cache and not needing the user to be forced to use the Cache. --- src/client/gateway/shard.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/gateway/shard.rs b/src/client/gateway/shard.rs index c026f0c..bc2b813 100644 --- a/src/client/gateway/shard.rs +++ b/src/client/gateway/shard.rs @@ -149,7 +149,7 @@ impl Shard { session_id: Some(ready.ready.session_id.clone()), shard_info: shard_info, ws_url: base_url.to_owned(), - manager: VoiceManager::new(tx, ready.ready.user.id.0), + manager: VoiceManager::new(tx, ready.ready.user.id), } } else { Shard { -- cgit v1.2.3