aboutsummaryrefslogtreecommitdiffstats
path: root/src/archive.rs
diff options
context:
space:
mode:
authorDean Li <deantvv@gmail.com>2021-04-18 03:22:52 +0000
committerDean Li <deantvv@gmail.com>2021-04-18 03:22:52 +0000
commitc9506c72ff368867982d138a686648fa302b116d (patch)
tree01f25ffc462c27399fc7764f4081cd71f85b6d62 /src/archive.rs
parentSeparate tar archive and tar flags (diff)
downloadminiserve-c9506c72ff368867982d138a686648fa302b116d.tar.gz
miniserve-c9506c72ff368867982d138a686648fa302b116d.zip
Change naming of uncompressed/compressed tarballs
Use following terminology: uncompressed tarballs => `uncompressed tar archives` compressed ones => `gz-compressed tar archives`
Diffstat (limited to 'src/archive.rs')
-rw-r--r--src/archive.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/archive.rs b/src/archive.rs
index 28d26b5..e53aea8 100644
--- a/src/archive.rs
+++ b/src/archive.rs
@@ -53,15 +53,10 @@ impl CompressionMethod {
}
}
- pub fn is_enabled(
- self,
- tar_enabled: bool,
- tar_archive_enabled: bool,
- zip_enabled: bool,
- ) -> bool {
+ pub fn is_enabled(self, tar_enabled: bool, tar_gz_enabled: bool, zip_enabled: bool) -> bool {
match self {
+ CompressionMethod::TarGz => tar_gz_enabled,
CompressionMethod::Tar => tar_enabled,
- CompressionMethod::TarGz => tar_archive_enabled,
CompressionMethod::Zip => zip_enabled,
}
}