Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
- --> nexus/servant/src/db/db.rs:58:22
- |
- 58 | .query_one(&self.query_documents, &[&w_id])
- | ^^^^^^^^^
- |
- note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 52:5...
- --> nexus/servant/src/db/db.rs:52:5
- |
- 52 | / fn handle(&mut self, msg: QueryDocuments, _: &mut Self::Context) -> Self::Result {
- 53 | | let documents = FuturesUnordered::new();
- 54 | | for _ in 0..msg.0 {
- 55 | | let w_id = 1 as i32;
- ... |
- 72 | | Box::pin(documents.try_collect())
- 73 | | }
- | |_____^
- note: ...so that reference does not outlive borrowed content
- --> nexus/servant/src/db/db.rs:57:17
- |
- 57 | self.client
- | ^^^^^^^^^^^
- = note: but, the lifetime must be valid for the static lifetime...
- note: ...so that the expression is assignable
- --> nexus/servant/src/db/db.rs:72:9
- |
- 72 | Box::pin(documents.try_collect())
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement