From 3c2e7a75cf54e9065c8ed1f634d68323c3e43490 Mon Sep 17 00:00:00 2001 From: Headline Date: Thu, 12 Nov 2020 02:25:08 -0800 Subject: [PATCH] Build against serenity v0.9 (#68) --- Cargo.lock | 93 ++++++++++++++++++++++++++++------------------------- Cargo.toml | 3 +- src/main.rs | 2 +- 3 files changed, 51 insertions(+), 47 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cb3469b..f7af39b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,18 +21,6 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" -[[package]] -name = "async-tls" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7e7fbc0843fc5ad3d5ca889c5b2bea9130984d34cd0e62db57ab70c2529a8e3" -dependencies = [ - "futures", - "rustls", - "webpki", - "webpki-roots 0.20.0", -] - [[package]] name = "async-trait" version = "0.1.41" @@ -46,17 +34,18 @@ dependencies = [ [[package]] name = "async-tungstenite" -version = "0.8.0" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5c45a0dd44b7e6533ac4e7acc38ead1a3b39885f5bbb738140d30ea528abc7c" +checksum = "9ce503a5cb1e7450af7d211b86b84807791b251f335b2f43f1e26b85a416f315" dependencies = [ - "async-tls", "futures-io", "futures-util", "log", - "pin-project", + "pin-project 1.0.1", "tokio", + "tokio-rustls", "tungstenite", + "webpki-roots 0.20.0", ] [[package]] @@ -88,6 +77,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + [[package]] name = "bitflags" version = "1.2.1" @@ -195,8 +190,9 @@ dependencies = [ [[package]] name = "command_attr" -version = "0.3.0-rc.2" -source = "git+https://github.com/Headline/serenity?branch=compiler#5362980dcd661e254f9157e71c6e8ad6fae66385" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc8da29004a4dd9b89d21b2e17ccd372c1ff085bdab9e22b989096db1289d01" dependencies = [ "proc-macro2", "quote", @@ -390,7 +386,6 @@ checksum = "5d8e3078b7b2a8a671cb7a3d17b4760e4181ea243227776ba83fd043b4ca034e" dependencies = [ "futures-channel", "futures-core", - "futures-executor", "futures-io", "futures-sink", "futures-task", @@ -413,17 +408,6 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d674eaa0056896d5ada519900dbf97ead2e46a7b6621e8160d79e2f2e1e2784b" -[[package]] -name = "futures-executor" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc709ca1da6f66143b8c9bec8e6260181869893714e9b5a490b169b0414144ab" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - [[package]] name = "futures-io" version = "0.3.6" @@ -470,7 +454,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project", + "pin-project 0.4.26", "pin-utils", "proc-macro-hack", "proc-macro-nested", @@ -549,7 +533,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed18eb2459bf1a09ad2d6b1547840c3e5e62882fa09b9a6a20b1de8e3228848f" dependencies = [ - "base64", + "base64 0.12.3", "bitflags", "bytes", "headers-core", @@ -635,7 +619,7 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project", + "pin-project 0.4.26", "socket2", "tokio", "tower-service", @@ -1004,7 +988,16 @@ version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13fbdfd6bdee3dc9be46452f86af4a4072975899cf8592466668620bebfbcc17" dependencies = [ - "pin-project-internal", + "pin-project-internal 0.4.26", +] + +[[package]] +name = "pin-project" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee41d838744f60d959d7074e3afb6b35c7456d0f61cad38a24e35e6553f73841" +dependencies = [ + "pin-project-internal 1.0.1", ] [[package]] @@ -1018,6 +1011,17 @@ dependencies = [ "syn", ] +[[package]] +name = "pin-project-internal" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a4ffa594b66bff340084d4081df649a7dc049ac8d7fc458d8e628bfbbb2f86" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "pin-project-lite" version = "0.1.10" @@ -1284,7 +1288,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9eaa17ac5d7b838b7503d118fa16ad88f440498bf9ffe5424e621f93190d61e" dependencies = [ - "base64", + "base64 0.12.3", "bytes", "encoding_rs", "futures-core", @@ -1339,7 +1343,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" dependencies = [ - "base64", + "base64 0.12.3", "log", "ring", "sct", @@ -1452,12 +1456,13 @@ dependencies = [ [[package]] name = "serenity" -version = "0.9.0-rc.2" -source = "git+https://github.com/Headline/serenity?branch=compiler#5362980dcd661e254f9157e71c6e8ad6fae66385" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbd2938b8859261d418ba8325a795000e37e9cba1b19d4e978775c5e34dc997" dependencies = [ "async-trait", "async-tungstenite", - "base64", + "base64 0.13.0", "bitflags", "bytes", "chrono", @@ -1479,7 +1484,7 @@ dependencies = [ [[package]] name = "serenity_utils" version = "0.5.1" -source = "git+https://github.com/Headline/serenity-utils?branch=compiler#16c26e9dedd33a5fc96b4c00a8ff3889265077c6" +source = "git+https://github.com/Headline/serenity-utils?branch=compiler#931660e97a5b0f3bf8af02979940ac118e2cbe16" dependencies = [ "serenity", "tokio", @@ -1684,7 +1689,7 @@ checksum = "6d9e878ad426ca286e4dcae09cbd4e1973a7f8987d97570e2469703dd7f5720c" dependencies = [ "futures-util", "log", - "pin-project", + "pin-project 0.4.26", "tokio", "tungstenite", ] @@ -1748,7 +1753,7 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" dependencies = [ - "pin-project", + "pin-project 0.4.26", "tracing", ] @@ -1764,7 +1769,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0308d80d86700c5878b9ef6321f020f29b1bb9d5ff3cab25e75e23f3a492a23" dependencies = [ - "base64", + "base64 0.12.3", "byteorder", "bytes", "http", @@ -1930,7 +1935,7 @@ dependencies = [ "mime", "mime_guess", "multipart", - "pin-project", + "pin-project 0.4.26", "scoped-tls", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index afef3a6..bb1340e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,10 +25,9 @@ chrono = "0.4.19" [dependencies.serenity] +version = "0.9" default-features = false features = ["collector", "gateway", "builder", "standard_framework", "http", "model", "client", "framework", "utils", "rustls_backend"] -git = "https://github.com/Headline/serenity" -branch = "compiler" [dependencies.wandbox] version = "0.1" diff --git a/src/main.rs b/src/main.rs index 579d852..291c511 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,7 +79,7 @@ async fn main() -> Result<(), Box> { .bucket("nospam", |b| b.delay(3).time_span(10).limit(3)) .await .on_dispatch_error(events::dispatch_error); - let mut client = serenity::Client::new(token) + let mut client = serenity::Client::builder(token) .framework(framework) .event_handler(events::Handler) .add_intent(GatewayIntents::GUILDS)