Add Send to StreamTrait (#622)

* update ouroboros

* Add Send to StreamTrait
This commit is contained in:
Marco Napetti 2022-03-22 10:17:07 +01:00 committed by GitHub
parent a9bb998185
commit e80aa07c7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -37,7 +37,7 @@ serde = { version = "^1.0", features = ["derive"] }
serde_json = { version = "^1", optional = true } serde_json = { version = "^1", optional = true }
sqlx = { version = "^0.5", optional = true } sqlx = { version = "^0.5", optional = true }
uuid = { version = "0.8", features = ["serde", "v4"], optional = true } uuid = { version = "0.8", features = ["serde", "v4"], optional = true }
ouroboros = "0.14" ouroboros = "0.15"
url = "^2.2" url = "^2.2"
once_cell = "1.8" once_cell = "1.8"

View File

@ -35,7 +35,7 @@ pub trait ConnectionTrait: Sync {
/// Stream query results /// Stream query results
#[async_trait::async_trait] #[async_trait::async_trait]
pub trait StreamTrait<'a>: Sync { pub trait StreamTrait<'a>: Send + Sync {
/// Create a stream for the [QueryResult] /// Create a stream for the [QueryResult]
type Stream: Stream<Item = Result<QueryResult, DbErr>> + Send; type Stream: Stream<Item = Result<QueryResult, DbErr>> + Send;

View File

@ -132,6 +132,7 @@ impl FromQueryResult for JsonValue {
} }
Ok(JsonValue::Object(map)) Ok(JsonValue::Object(map))
} }
_ => unreachable!(),
} }
} }
} }