From 372156e638ce45cd25223d15d6d2168468af2f40 Mon Sep 17 00:00:00 2001 From: Erk Date: Sat, 20 Aug 2022 15:01:06 +0000 Subject: [PATCH] Deps: Update twilight to 0.13 (#147) * update twilight to 0.13 * Update src/manager.rs Co-authored-by: Kyle Simpson Co-authored-by: Kyle Simpson --- Cargo.toml | 4 ++-- examples/twilight/Cargo.toml | 8 ++++---- src/manager.rs | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c4dfc4a..642e9a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,8 +41,8 @@ tokio-tungstenite = { optional = true, version = "0.17" } tokio-util = { features = ["io"], optional = true, version = "0.7" } tracing = { version = "0.1", features = ["log"] } tracing-futures = "0.2" -twilight-gateway = { default-features = false, optional = true, version = "0.12.0" } -twilight-model = { default-features = false, optional = true, version = "0.12.0" } +twilight-gateway = { default-features = false, optional = true, version = "0.13.0" } +twilight-model = { default-features = false, optional = true, version = "0.13.0" } typemap_rev = { optional = true, version = "0.1" } url = { optional = true, version = "2" } uuid = { features = ["v4"], optional = true, version = "1" } diff --git a/examples/twilight/Cargo.toml b/examples/twilight/Cargo.toml index 7835394..139238e 100644 --- a/examples/twilight/Cargo.toml +++ b/examples/twilight/Cargo.toml @@ -10,10 +10,10 @@ reqwest = "0.11" tracing = "0.1" tracing-subscriber = "0.2" tokio = { features = ["macros", "rt-multi-thread", "sync"], version = "1" } -twilight-gateway = "0.12" -twilight-http = "0.12" -twilight-model = "0.12" -twilight-standby = "0.12" +twilight-gateway = "0.13" +twilight-http = "0.13" +twilight-model = "0.13" +twilight-standby = "0.13" [dependencies.songbird] default-features = false diff --git a/src/manager.rs b/src/manager.rs index ef81145..f2d6313 100644 --- a/src/manager.rs +++ b/src/manager.rs @@ -359,7 +359,8 @@ impl Songbird { pub async fn process(&self, event: &TwilightEvent) { match event { TwilightEvent::VoiceServerUpdate(v) => { - let call = v.guild_id.map(GuildId::from).and_then(|id| self.get(id)); + let id = GuildId::from(v.guild_id); + let call = self.get(id); if let Some(call) = call { let mut handler = call.lock().await;