From e80aa07c7c48e6645a5349d726fd71bc27ca5a7a Mon Sep 17 00:00:00 2001 From: Marco Napetti <7566389+nappa85@users.noreply.github.com> Date: Tue, 22 Mar 2022 10:17:07 +0100 Subject: [PATCH] Add Send to StreamTrait (#622) * update ouroboros * Add Send to StreamTrait --- Cargo.toml | 2 +- src/database/connection.rs | 2 +- src/query/json.rs | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c3ea2353..b3f7f50b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ serde = { version = "^1.0", features = ["derive"] } serde_json = { version = "^1", optional = true } sqlx = { version = "^0.5", optional = true } uuid = { version = "0.8", features = ["serde", "v4"], optional = true } -ouroboros = "0.14" +ouroboros = "0.15" url = "^2.2" once_cell = "1.8" diff --git a/src/database/connection.rs b/src/database/connection.rs index 46da564b..c9803a83 100644 --- a/src/database/connection.rs +++ b/src/database/connection.rs @@ -35,7 +35,7 @@ pub trait ConnectionTrait: Sync { /// Stream query results #[async_trait::async_trait] -pub trait StreamTrait<'a>: Sync { +pub trait StreamTrait<'a>: Send + Sync { /// Create a stream for the [QueryResult] type Stream: Stream> + Send; diff --git a/src/query/json.rs b/src/query/json.rs index 589f0fad..75c1e060 100644 --- a/src/query/json.rs +++ b/src/query/json.rs @@ -132,6 +132,7 @@ impl FromQueryResult for JsonValue { } Ok(JsonValue::Object(map)) } + _ => unreachable!(), } } }