.saturating_add(Duration::from_nanos(999_999_999))
.as_secs();
- let prefix = format!(into_crlfs!(
+ let prefix1 = format!(into_crlfs!(
r#"--
Content-Type: text/plain; charset="utf-8"
Content-Disposition: form-data; name="m"
--b--
"#),
);
-eprintln!(">{}[{}D]{}<", &prefix, &prefix2, &suffix);
let body = hyper::body::Body::wrap_stream(
- futures::stream::iter(
+ 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::<_,Void>)
- )
+ ).map(Ok::<Bytes,Void>),
+ [ Ok::<Bytes,Void>( suffix.into() ) ],
+ ])
);
let req = hyper::Request::post(&c.ic.url).body(body)
// SPDX-License-Identifier: AGPL-3.0-or-later
// There is NO WARRANTY.
+pub use std::array;
pub use std::collections::{BTreeSet, HashMap};
pub use std::convert::TryInto;
pub use std::borrow::Cow;