"#),
);
+ macro_rules! content {
+ {} => {
+ itertools::chain![
+ array::IntoIter::new([
+ Ok::<Bytes,Void>( prefix1.into() ),
+ Ok::<Bytes,Void>( prefix2.into() ),
+ ]).take(
+ if upbound.is_empty() { 1 } else { 2 }
+ ),
+ Itertools::intersperse(
+ upbound.into_iter().map(|u| Bytes::from(u)),
+ SLIP_END_SLICE.into()
+ ).map(Ok::<Bytes,Void>),
+ [ Ok::<Bytes,Void>( suffix.into() ) ],
+ ]
+ }
+ }
+
let body = hyper::body::Body::wrap_stream(
- futures::stream::iter(itertools::chain![
- array::IntoIter::new([
- Ok::<Bytes,Void>( prefix1.into() ),
- Ok::<Bytes,Void>( prefix2.into() ),
- ]).take(
- if upbound.is_empty() { 1 } else { 2 }
- ),
- Itertools::intersperse(
- upbound.into_iter().map(|u| Bytes::from(u)),
- SLIP_END_SLICE.into()
- ).map(Ok::<Bytes,Void>),
- [ Ok::<Bytes,Void>( suffix.into() ) ],
- ])
+ futures::stream::iter(
+ content!()
+ )
);
let req = hyper::Request::post(&c.ic.url)