From 08113e45fb2472050ee2643bcb166112377fa230 Mon Sep 17 00:00:00 2001 From: Hubert Date: Thu, 8 Jul 2021 20:53:24 +0200 Subject: [PATCH] save --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index ef4cb37..f2baaf4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -204,8 +204,8 @@ async fn git_proto(payload : web::Payload, web::Path((owner, reponame)): web::Pa println!("Write body..."); //let mut body = Vec::new(); //rdr.bytes() - let mut buff : [u8; 1024] = [0; 1024]; let response = builder.streaming(stream::repeat_with(|| { + let mut buff : [u8; 1024] = [0; 1024]; match rdr.read(&mut buff[..]) { Ok(l) => {Ok(Bytes::copy_from_slice(&buff[0..l]))} Err(e) => {Err(e)}