chiark / gitweb /
wip refactor body, move ok
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 Aug 2021 17:49:52 +0000 (18:49 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 1 Aug 2021 17:49:52 +0000 (18:49 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bin/client.rs

index fef184651afd0b00fdbf17b830e55baf57dd7b02..52c577917a432f705eb61ae67fe837ad55919551 100644 (file)
@@ -73,22 +73,22 @@ fn submit_request<'r, 'c:'r, C:HCC>(
   } => {
     itertools::chain![
       array::IntoIter::new([
-        Ok::<$out,Void>( prefix1.into() ),
-        Ok::<$out,Void>( prefix2.into() ),
+        prefix1.into(),
+        prefix2.into(),
       ]).take(
         if upbound.is_empty() { 1 } else { 2 }
       ),
       Itertools::intersperse(
         upbound.into_iter().map(|u| { let out: $out = u.into(); out }),
         SLIP_END_SLICE.into()
-      ).map(Ok::<$out,Void>),
-      [ Ok::<$out,Void>( suffix.into() ) ],
+      ),
+      [ suffix.into() ],
     ]
   }}
 
   let body = hyper::body::Body::wrap_stream(
     futures::stream::iter(
-      content!( Bytes )
+      content!( Bytes ).map(Ok::<Bytes,Void>)
     )
   );