diff --git a/src/compression.rs b/src/compression.rs index 18da9b0b..8b351478 100644 --- a/src/compression.rs +++ b/src/compression.rs @@ -131,23 +131,23 @@ impl fmt::Display for CompressionMethod { } /// The compression methods which have been implemented. -pub const SUPPORTED_METHODS: &[CompressionMethod] = &[ - CompressionMethod::Stored, - #[cfg(any( - feature = "deflate", - feature = "deflate-miniz", - feature = "deflate-zlib" - ))] - CompressionMethod::Deflated, - #[cfg(feature = "bzip2")] - CompressionMethod::Bzip2, - #[cfg(feature = "zstd")] - CompressionMethod::Zstd, +pub const SUPPORTED_COMPRESSION_METHODS: &[CompressionMethod] = &[ + CompressionMethod::Stored, + #[cfg(any( + feature = "deflate", + feature = "deflate-miniz", + feature = "deflate-zlib" + ))] + CompressionMethod::Deflated, + #[cfg(feature = "bzip2")] + CompressionMethod::Bzip2, + #[cfg(feature = "zstd")] + CompressionMethod::Zstd, ]; #[cfg(test)] mod test { - use super::{CompressionMethod, SUPPORTED_METHODS}; + use super::{CompressionMethod, SUPPORTED_COMPRESSION_METHODS}; #[test] fn from_eq_to() { @@ -172,7 +172,7 @@ mod test { assert_eq!(to, back); } - for &method in SUPPORTED_METHODS { + for &method in SUPPORTED_COMPRESSION_METHODS { check_match(method); } } @@ -185,7 +185,7 @@ mod test { assert_eq!(debug_str, display_str); } - for &method in SUPPORTED_METHODS { + for &method in SUPPORTED_COMPRESSION_METHODS { check_match(method); } } diff --git a/src/lib.rs b/src/lib.rs index f2b8cf7b..03005634 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,7 +5,7 @@ #![warn(missing_docs)] -pub use crate::compression::{CompressionMethod, SUPPORTED_METHODS}; +pub use crate::compression::{CompressionMethod, SUPPORTED_COMPRESSION_METHODS}; pub use crate::read::ZipArchive; pub use crate::types::DateTime; pub use crate::write::ZipWriter;