fix all broken examples (#1248)
This commit is contained in:
1 parent
6751d5941b
commit
d637ef187c
12 files changed
+29
-25
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user