Skip to content

Commit

Permalink
Fix Clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Pr0methean committed Apr 20, 2024
1 parent cdc2e7a commit 124ebfd
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,12 @@ impl<A: Read + Write + Seek> ZipWriter<A> {
/// This function ensures that the '/' path separator is used and normalizes `.` and `..`. It
/// ignores any `..` or Windows drive letter that would produce a path outside the ZIP file's
/// root.
pub fn deep_copy_file_from_path<T: AsRef<Path>, U: AsRef<Path>>(&mut self, src_path: T, dest_path: U) -> ZipResult<()>
{
self.deep_copy_file(&*path_to_string(src_path), &*path_to_string(dest_path))
pub fn deep_copy_file_from_path<T: AsRef<Path>, U: AsRef<Path>>(
&mut self,
src_path: T,
dest_path: U,
) -> ZipResult<()> {
self.deep_copy_file(&path_to_string(src_path), &path_to_string(dest_path))
}
}

Expand Down Expand Up @@ -1012,7 +1015,11 @@ impl<W: Write + Seek> ZipWriter<W> {
/// This function ensures that the '/' path separator is used and normalizes `.` and `..`. It
/// ignores any `..` or Windows drive letter that would produce a path outside the ZIP file's
/// root.
pub fn raw_copy_file_to_path<P: AsRef<Path>>(&mut self, file: ZipFile, path: P) -> ZipResult<()> {
pub fn raw_copy_file_to_path<P: AsRef<Path>>(
&mut self,
file: ZipFile,
path: P,
) -> ZipResult<()> {
self.raw_copy_file_rename(file, path_to_string(path))
}

Expand Down Expand Up @@ -1244,9 +1251,12 @@ impl<W: Write + Seek> ZipWriter<W> {
/// This function ensures that the '/' path separator is used and normalizes `.` and `..`. It
/// ignores any `..` or Windows drive letter that would produce a path outside the ZIP file's
/// root.
pub fn shallow_copy_file_from_path<T: AsRef<Path>, U: AsRef<Path>>(&mut self, src_path: T, dest_path: U) -> ZipResult<()>
{
self.shallow_copy_file(&*path_to_string(src_path), &*path_to_string(dest_path))
pub fn shallow_copy_file_from_path<T: AsRef<Path>, U: AsRef<Path>>(
&mut self,
src_path: T,
dest_path: U,
) -> ZipResult<()> {
self.shallow_copy_file(&path_to_string(src_path), &path_to_string(dest_path))
}
}

Expand Down

0 comments on commit 124ebfd

Please sign in to comment.