diff --git a/src/write.rs b/src/write.rs index 08cd4825..2abf7861 100644 --- a/src/write.rs +++ b/src/write.rs @@ -6,13 +6,6 @@ use crate::result::{ZipError, ZipResult}; use crate::spec; use crate::types::{ffi, AtomicU64, DateTime, System, ZipFileData, DEFAULT_VERSION}; use byteorder::{LittleEndian, WriteBytesExt}; -use crc32fast::Hasher; -use std::collections::HashMap; -use std::default::Default; -use std::io; -use std::io::prelude::*; -use std::io::{BufReader, SeekFrom}; -use std::mem; #[cfg(any( feature = "deflate", feature = "deflate-miniz", @@ -23,6 +16,13 @@ use std::mem; feature = "zstd", ))] use core::num::NonZeroU64; +use crc32fast::Hasher; +use std::collections::HashMap; +use std::default::Default; +use std::io; +use std::io::prelude::*; +use std::io::{BufReader, SeekFrom}; +use std::mem; use std::str::{from_utf8, Utf8Error}; use std::sync::Arc; @@ -1419,7 +1419,10 @@ fn bzip2_compression_level_range() -> std::ops::RangeInclusive { feature = "bzip2", feature = "zstd" ))] -fn clamp_opt>(value: T, range: std::ops::RangeInclusive) -> Option { +fn clamp_opt>( + value: T, + range: std::ops::RangeInclusive, +) -> Option { if range.contains(&value.try_into().ok()?) { Some(value) } else { diff --git a/tests/end_to_end.rs b/tests/end_to_end.rs index 255c06bc..a1b9eebc 100644 --- a/tests/end_to_end.rs +++ b/tests/end_to_end.rs @@ -1,7 +1,7 @@ use byteorder::{LittleEndian, WriteBytesExt}; use std::collections::HashSet; use std::io::prelude::*; -use std::io::{Cursor}; +use std::io::Cursor; use zip_next::result::ZipResult; use zip_next::write::FileOptions; use zip_next::{CompressionMethod, ZipWriter, SUPPORTED_COMPRESSION_METHODS};