From d44fa5c40baae70fcf20e8224917d45ac8e972e5 Mon Sep 17 00:00:00 2001 From: Avril Date: Thu, 8 Oct 2020 16:03:06 +0100 Subject: [PATCH] wtf is wrong with the space eating --- Cargo.lock | 2 +- src/feed.rs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6719278..11417aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -639,7 +639,7 @@ dependencies = [ [[package]] name = "markov" -version = "0.3.3" +version = "0.3.4" dependencies = [ "async-compression", "cfg-if 1.0.0", diff --git a/src/feed.rs b/src/feed.rs index 8c849e3..0cbc5f0 100644 --- a/src/feed.rs +++ b/src/feed.rs @@ -15,10 +15,12 @@ pub async fn full(who: &IpAddr, state: State, mut body: impl Unpin + Stream 0 { + buffer.extend_from_slice(body.bytes()); // XXX: what the fuck is wrong with this??? why it eat spaces???? + let cnt = body.bytes().len(); + body.advance(cnt); + written += cnt; + } } } if !buffer.ends_with(&[b'\n']) { // probably useless eh?