chiark / gitweb /
Suppress a warning.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 23 Feb 2024 11:17:29 +0000 (11:17 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 23 Feb 2024 15:41:09 +0000 (15:41 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
client/client.rs

index 7511c87fcae4cc89d5518c8ade945192813bf676..bebb83df1e47f28b81e6f9372dff875a0647de51 100644 (file)
@@ -291,7 +291,9 @@ async fn run_client<C:Hcc>(
         (got, goti, _) = async { future::select_all(&mut reqs).await },
           if ! reqs.is_empty() =>
         {
-          reqs.swap_remove(goti);
+          // This future was Ready and has returned the value,
+          // which is in `got`.  We don't want the completed future.
+          let _: Pin<Box<dyn Future<Output = _>>> = reqs.swap_remove(goti);
 
           if let Some(got) = got {