From 9c6ff4eddfb5c2e3abb65e100dc5b5f87277b2a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=98=D0=B0=D0=BD=20=D0=93=D0=B5=D0=BE?= =?UTF-8?q?=D1=80=D0=B3=D0=B8=D0=B5=D0=B2=D1=81=D0=BA=D0=B8?= Date: Sat, 21 Sep 2019 15:44:06 +0200 Subject: [PATCH] rename channel to threaded_archiver I think that reflects its purpose much better --- src/main.rs | 2 +- src/{channel.rs => threaded_archiver.rs} | 0 src/web.rs | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename src/{channel.rs => threaded_archiver.rs} (100%) diff --git a/src/main.rs b/src/main.rs index 1bde576..ac6fd5a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -mod channel; +mod threaded_archiver; mod web; fn main() -> std::io::Result<()> { diff --git a/src/channel.rs b/src/threaded_archiver.rs similarity index 100% rename from src/channel.rs rename to src/threaded_archiver.rs diff --git a/src/web.rs b/src/web.rs index 0139c48..f0f72b3 100644 --- a/src/web.rs +++ b/src/web.rs @@ -5,7 +5,7 @@ use futures::Stream; use percent_encoding::{utf8_percent_encode, NON_ALPHANUMERIC}; use v_htmlescape::escape as escape_html_entity; -use crate::channel; +use crate::threaded_archiver; use std::fmt::Write; use std::path::PathBuf; @@ -100,7 +100,7 @@ fn handle_tar(req: HttpRequest) -> impl Responder { return Err(error::ErrorBadRequest("not a directory")); } - let stream = channel::stream_tar_in_thread(fullpath); + let stream = threaded_archiver::stream_tar_in_thread(fullpath); let resp = HttpResponse::Ok() .content_type("application/x-tar") .streaming(stream.map_err(|_e| error::ErrorBadRequest("stream error")));