diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2021-01-04 02:17:25 +0000 |
---|---|---|
committer | Sven-Hendrik Haase <svenstaro@gmail.com> | 2021-01-04 02:17:25 +0000 |
commit | c1d7a40e79775f8fc0821bd9fb0455f5acf2c4ce (patch) | |
tree | 90447a3383469328c7cc441d4a909d7b6bdcf7ef /src/archive.rs | |
parent | Bump deps (diff) | |
download | miniserve-c1d7a40e79775f8fc0821bd9fb0455f5acf2c4ce.tar.gz miniserve-c1d7a40e79775f8fc0821bd9fb0455f5acf2c4ce.zip |
Fix lint
Diffstat (limited to 'src/archive.rs')
-rw-r--r-- | src/archive.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/archive.rs b/src/archive.rs index ab43ffb..03c52cd 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -204,7 +204,7 @@ where /// ``` fn create_zip_from_directory<W>( out: W, - directory: &PathBuf, + directory: &Path, skip_symlinks: bool, ) -> Result<(), ContextualError> where @@ -212,7 +212,7 @@ where { let options = write::FileOptions::default().compression_method(zip::CompressionMethod::Stored); let mut paths_queue: Vec<PathBuf> = vec![]; - paths_queue.push(directory.clone()); + paths_queue.push(directory.to_path_buf()); let zip_root_folder_name = directory.file_name().ok_or_else(|| { ContextualError::InvalidPathError("Directory name terminates in \"..\"".to_string()) })?; |