diff options
author | equal-l2 <eng.equall2@gmail.com> | 2020-07-20 23:39:30 +0000 |
---|---|---|
committer | equal-l2 <eng.equall2@gmail.com> | 2020-07-21 16:53:06 +0000 |
commit | 3bcc68127d3b5bd95c6f1d2af1e544fdc0ae4de5 (patch) | |
tree | 7b73615055631658a94a57c20b09431f5c1de8bc /src/listing.rs | |
parent | Use actix-web-httpauth for authentication middleware (diff) | |
download | miniserve-3bcc68127d3b5bd95c6f1d2af1e544fdc0ae4de5.tar.gz miniserve-3bcc68127d3b5bd95c6f1d2af1e544fdc0ae4de5.zip |
Remove unrelevant comments
Diffstat (limited to 'src/listing.rs')
-rw-r--r-- | src/listing.rs | 13 |
1 files changed, 0 insertions, 13 deletions
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: - // `<rx as Stream>::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() |