From 3bcc68127d3b5bd95c6f1d2af1e544fdc0ae4de5 Mon Sep 17 00:00:00 2001 From: equal-l2 Date: Tue, 21 Jul 2020 08:39:30 +0900 Subject: Remove unrelevant comments --- src/listing.rs | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/listing.rs') diff --git a/src/listing.rs b/src/listing.rs index a4eda88..388153f 100644 --- a/src/listing.rs +++ b/src/listing.rs @@ -321,19 +321,6 @@ pub fn directory_listing( } }); - // `rx` is a receiver of bytes - it can act like a `Stream` of bytes, and that's exactly - // what actix-web wants to stream the response. - // - // But right now the error types do not match: - // `::Error == ()`, but we want `actix_web::error::Error` - // - // That being said, `rx` will never fail because the `Stream` implementation for `Receiver` - // never returns an error - it simply cannot fail. - //let rx = rx.map_err(|_| unreachable!("pipes never fail")); - - // At this point, `rx` implements everything actix want for a streamed response, - // so we can just give a `Box::new(rx)` as streaming body. - Ok(ServiceResponse::new( req.clone(), HttpResponse::Ok() -- cgit v1.2.3