title: Return anything in async move block
body: <p>So I implmented <a href="https://stackoverflow.com/a/51047786/9934156">this</a> code-example and changed it up a little. It now looks like this:</p>
  <pre><code>pub async fn loadAllSNPData(&amp;mut self, client: &amp;Client) {
  
  
  let bodies = stream::iter(&amp;self.snps)
      .map(|snp|  {
  
          let url = format!(&quot;https://ncbi.gov/?db=snp&amp;id={}&quot;,snp.identifier);
  
          let client = &amp;client;
  
          async move {
  
              let resp = client.get(&amp;url).send().await?;
              let rawJson = resp.text().await;
  
  
  
              // parse json
              let json: Value = serde_json::from_str(&amp;rawJson).expect(&quot;JSON was not well-formatted&quot;);
              
              Ok((json,snp))
          }
  
      })
      .buffer_unordered(PARALLEL_REQUESTS);
  
  bodies
      .for_each(|b| {
          async {
  
              match b {
                  Ok(b) =&gt; println!(&quot;Got {} bytes&quot;, b),
                  Err(e) =&gt; eprintln!(&quot;Got an error: {}&quot;, e),
              }
          }
      })
      .await;
  
  }
  </code></pre>
  <p>It was all working fine until I wanted to return something different than the <code>rawJson</code>-Variable containing the text. I want to return the parsed json and the according snp-element to another function that then filters some information from the JSON-Object and stored it inside the corresponding snp-Object. But whenever I change the object that gets returned I get the following error:</p>
  <blockquote>
  <p>error[E0277]: the <code>?</code> operator can only be used in an async block that
  returns <code>Result</code> or <code>Option</code>...</p>
  </blockquote>
  <p>It then continues to mark the entire <code>async move</code>-Block as the origin of the error. How would I go about this to return different things?</p>
  <p>Edit: I now return Ok((json,snp)) and get</p>
  <blockquote>
  <p>error[E0698]: type inside <code>async fn</code> body must be known in this
  context</p>
  </blockquote>
  <pre><code>Ok((json,snp))
  ^^ cannot infer type for type parameter `E` declared on
  the enum `Result`
  </code></pre>