fix all broken examples (#1248)

This commit is contained in:
ealmloff authored and GitHub committed 2023-07-25 14:30:08 -05:00
1 parent 6751d5941b
commit d637ef187c
12 files changed
+29 -25

No files matched your search

+2 -4
View File
@@ -168,10 +168,8 @@ pub(crate) struct Query<V: DeserializeOwned> {
impl<V: DeserializeOwned> Query<V> {
/// Resolve the query
pub async fn resolve(mut self) -> Result<V, QueryError> {
match self.receiver.recv().await {
Some(result) => V::deserialize(result).map_err(QueryError::Deserialize),
None => Err(QueryError::Recv(RecvError::Closed)),
}
let result = self.result().await?;
V::deserialize(result).map_err(QueryError::Deserialize)
}
/// Send a message to the query