diff options
author | mahdi <mahdi.robatipoor@gmail.com> | 2019-05-31 16:40:43 +0000 |
---|---|---|
committer | mahdi <mahdi.robatipoor@gmail.com> | 2019-05-31 16:40:43 +0000 |
commit | ff682cec04c0abc34b3324122afe0e52a1b1668d (patch) | |
tree | 32885783b16552857eb2149e8d01b8e197e19eb2 /src/listing.rs | |
parent | Merge pull request #127 from svenstaro/dependabot/cargo/libflate-0.1.23 (diff) | |
download | miniserve-ff682cec04c0abc34b3324122afe0e52a1b1668d.tar.gz miniserve-ff682cec04c0abc34b3324122afe0e52a1b1668d.zip |
refactor code
Diffstat (limited to 'src/listing.rs')
-rw-r--r-- | src/listing.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/listing.rs b/src/listing.rs index 49802bc..2ffcf2f 100644 --- a/src/listing.rs +++ b/src/listing.rs @@ -10,7 +10,7 @@ use std::path::{Path, PathBuf}; use std::time::SystemTime; use strum_macros::{Display, EnumString}; -use crate::archive::{self, CompressionMethod}; +use crate::archive::CompressionMethod; use crate::errors::{self, ContextualError}; use crate::renderer; use crate::themes::ColorScheme; @@ -241,7 +241,7 @@ pub fn directory_listing<S>( extension = compression_method.extension(), path = &dir.path.display().to_string() ); - match archive::create_archive(&compression_method, &dir.path, skip_symlinks) { + match compression_method.create_archive(&dir.path, skip_symlinks) { Ok((filename, content)) => { log::info!("{file} successfully created !", file = &filename); Ok(HttpResponse::Ok() |