From 18336e4d0a95f185d82de70cd4977e0b3f8f566f Mon Sep 17 00:00:00 2001 From: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> Date: Mon, 26 Sep 2022 14:45:16 -0600 Subject: [PATCH] update patch-db (#1831) --- backend/Cargo.lock | 35 +---------------------------------- backend/src/db/mod.rs | 4 ++-- libs/Cargo.lock | 39 --------------------------------------- patch-db | 2 +- 4 files changed, 4 insertions(+), 76 deletions(-) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index baf116394..d8bd94c80 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -207,17 +207,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "barrage" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5951c75bdabb58753d140dd5802f12ff3a483cb2e16fb5276e111b94b19e87" -dependencies = [ - "concurrent-queue", - "event-listener", - "spin 0.9.4", -] - [[package]] name = "base32" version = "0.4.0" @@ -438,12 +427,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" -[[package]] -name = "cache-padded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" - [[package]] name = "cc" version = "1.0.73" @@ -600,15 +583,6 @@ dependencies = [ "tracing-error 0.2.0", ] -[[package]] -name = "concurrent-queue" -version = "1.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4780a44ab5696ea9e28294517f1fffb421a83a25af521333c838635509db9c" -dependencies = [ - "cache-padded", -] - [[package]] name = "const-oid" version = "0.9.0" @@ -2770,7 +2744,6 @@ name = "patch-db" version = "0.1.0" dependencies = [ "async-trait", - "barrage", "fd-lock-rs", "futures", "imbl 1.0.1", @@ -3326,7 +3299,7 @@ dependencies = [ "cc", "libc", "once_cell", - "spin 0.5.2", + "spin", "untrusted", "web-sys", "winapi", @@ -3846,12 +3819,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "spin" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" - [[package]] name = "spki" version = "0.6.0" diff --git a/backend/src/db/mod.rs b/backend/src/db/mod.rs index 1f0ce0fdd..7de3b3632 100644 --- a/backend/src/db/mod.rs +++ b/backend/src/db/mod.rs @@ -77,7 +77,7 @@ async fn subscribe_to_session_kill( async fn deal_with_messages( _has_valid_authentication: HasValidSession, mut kill: oneshot::Receiver<()>, - sub: patch_db::Subscriber, + mut sub: patch_db::Subscriber, mut stream: WebSocketStream, ) -> Result<(), Error> { loop { @@ -93,7 +93,7 @@ async fn deal_with_messages( .with_kind(crate::ErrorKind::Network)?; return Ok(()) } - new_rev = sub.recv_async().fuse() => { + new_rev = sub.recv().fuse() => { let rev = new_rev.expect("UNREACHABLE: patch-db is dropped"); stream .send(Message::Text(serde_json::to_string(&rev).with_kind(crate::ErrorKind::Serialization)?)) diff --git a/libs/Cargo.lock b/libs/Cargo.lock index 6f8d4f0b5..0810bc976 100644 --- a/libs/Cargo.lock +++ b/libs/Cargo.lock @@ -105,17 +105,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "barrage" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5951c75bdabb58753d140dd5802f12ff3a483cb2e16fb5276e111b94b19e87" -dependencies = [ - "concurrent-queue", - "event-listener", - "spin", -] - [[package]] name = "base64" version = "0.11.0" @@ -185,12 +174,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0b3de4a0c5e67e16066a0715723abd91edc2f9001d09c46e1dca929351e130e" -[[package]] -name = "cache-padded" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" - [[package]] name = "cc" version = "1.0.73" @@ -230,15 +213,6 @@ dependencies = [ "tracing-error 0.2.0", ] -[[package]] -name = "concurrent-queue" -version = "1.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4780a44ab5696ea9e28294517f1fffb421a83a25af521333c838635509db9c" -dependencies = [ - "cache-padded", -] - [[package]] name = "convert_case" version = "0.4.0" @@ -473,12 +447,6 @@ dependencies = [ "syn", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - [[package]] name = "eyre" version = "0.6.8" @@ -1359,7 +1327,6 @@ name = "patch-db" version = "0.1.0" dependencies = [ "async-trait", - "barrage", "fd-lock-rs", "futures", "imbl", @@ -1930,12 +1897,6 @@ dependencies = [ "url", ] -[[package]] -name = "spin" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" - [[package]] name = "static_assertions" version = "1.1.0" diff --git a/patch-db b/patch-db index e74f36f07..50657d63e 160000 --- a/patch-db +++ b/patch-db @@ -1 +1 @@ -Subproject commit e74f36f07350c5d2d2934f7b2d9526b9d15bec99 +Subproject commit 50657d63e2b70e6b1ebb84468c09a04a9b9e78ac