From 89b042ba9e2678c7861ae35bc55ad3acd2a42367 Mon Sep 17 00:00:00 2001 From: shockrah Date: Wed, 2 Sep 2020 19:12:05 -0700 Subject: [PATCH] Using async_trait crate to let us create asynchronous trait functions this is only temporary until the rust standard changes --- server-api/Cargo.lock | 15 +++++++++++++++ server-api/db/Cargo.lock | 30 ++++++++++++++++++++++++------ 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/server-api/Cargo.lock b/server-api/Cargo.lock index b104c9b..c005f7a 100644 --- a/server-api/Cargo.lock +++ b/server-api/Cargo.lock @@ -47,6 +47,16 @@ name = "arrayvec" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "async-trait" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "atty" version = "0.2.14" @@ -296,6 +306,10 @@ dependencies = [ [[package]] name = "db" version = "0.1.0" +dependencies = [ + "async-trait 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "mysql_async 0.23.1 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "digest" @@ -1730,6 +1744,7 @@ dependencies = [ "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum arc-swap 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" "checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" +"checksum async-trait 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "687c230d85c0a52504709705fc8a53e4a692b83a2184f03dae73e38e1e93a783" "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" "checksum autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" "checksum backtrace 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)" = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" diff --git a/server-api/db/Cargo.lock b/server-api/db/Cargo.lock index 0771db4..433aa78 100644 --- a/server-api/db/Cargo.lock +++ b/server-api/db/Cargo.lock @@ -30,6 +30,17 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" +[[package]] +name = "async-trait" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "687c230d85c0a52504709705fc8a53e4a692b83a2184f03dae73e38e1e93a783" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "autocfg" version = "1.0.1" @@ -149,6 +160,12 @@ dependencies = [ "time 0.1.44", ] +[[package]] +name = "const_fn" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce90df4c658c62f12d78f7508cf92f9173e5184a539c10bfe54a3107b3ffd0f2" + [[package]] name = "core-foundation" version = "0.7.0" @@ -250,6 +267,7 @@ dependencies = [ name = "db" version = "0.1.0" dependencies = [ + "async-trait", "mysql_async", ] @@ -494,9 +512,9 @@ checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" [[package]] name = "libz-sys" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af67924b8dd885cccea261866c8ce5b74d239d272e154053ff927dae839f5ae9" +checksum = "23b34178653005c1181711c333f0e5604a14a1b5115c814fd42304bdd16245e0" dependencies = [ "cc", "pkg-config", @@ -664,7 +682,7 @@ dependencies = [ "serde_json", "sha1", "sha2", - "time 0.2.16", + "time 0.2.17", "twox-hash", "uuid", ] @@ -1225,11 +1243,11 @@ dependencies = [ [[package]] name = "time" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a51cadc5b1eec673a685ff7c33192ff7b7603d0b75446fb354939ee615acb15" +checksum = "ca7ec98a72285d12e0febb26f0847b12d54be24577618719df654c66cadab55d" dependencies = [ - "cfg-if", + "const_fn", "libc", "standback", "stdweb",