title: Can't get async closure to work with Warp::Filter
body: <p>I am trying to get an async closure working in the <code>and_then</code> filter from <code>Warp</code>.</p>
  <p>This is the smallest example I could come up with where I am reasonably sure I didn't leave any important details out:</p>
  <pre class="lang-rust prettyprint-override"><code>use std::{convert::Infallible, sync::Arc, thread, time};
  use tokio::sync::RwLock;
  use warp::Filter;
  
  fn main() {
      let man = Manifest::new();
  
      let check = warp::path(&quot;updates&quot;).and_then(|| async move { GetAvailableBinaries(&amp;man).await });
  }
  
  async fn GetAvailableBinaries(man: &amp;Manifest) -&gt; Result&lt;impl warp::Reply, Infallible&gt; {
      Ok(warp::reply::json(&amp;man.GetAvailableBinaries().await))
  }
  
  pub struct Manifest {
      binaries: Arc&lt;RwLock&lt;Vec&lt;i32&gt;&gt;&gt;,
  }
  
  impl Manifest {
      pub fn new() -&gt; Manifest {
          let bins = Arc::new(RwLock::new(Vec::new()));
  
          thread::spawn(move || async move {
              loop {
                  thread::sleep(time::Duration::from_millis(10000));
              }
          });
  
          Manifest { binaries: bins }
      }
  
      pub async fn GetAvailableBinaries(&amp;self) -&gt; Vec&lt;i32&gt; {
          self.binaries.read().await.to_vec()
      }
  }
  </code></pre>
  <p>I am using:</p>
  <pre><code>[dependencies]
  tokio = { version = &quot;0.2&quot;, features = [&quot;full&quot;] }
  warp = { version = &quot;0.2&quot;, features = [&quot;tls&quot;] }
  </code></pre>
  <p>The error is:</p>
  <pre class="lang-none prettyprint-override"><code>error[E0525]: expected a closure that implements the `Fn` trait, but this closure only implements `FnOnce`
   --&gt; src/main.rs:9:48
    |
  9 |     let check = warp::path(&quot;updates&quot;).and_then(|| async move { GetAvailableBinaries(&amp;man).await });
    |                                       -------- ^^^^^^^^^^^^^ ------------------------------------ closure is `FnOnce` because it moves the variable `man` out of its environment
    |                                       |        |
    |                                       |        this closure implements `FnOnce`, not `Fn`
    |                                       the requirement to implement `Fn` derives from here
  </code></pre>