diff --git a/src/read.rs b/src/read.rs index 728ddf57..32403fa0 100644 --- a/src/read.rs +++ b/src/read.rs @@ -461,7 +461,7 @@ impl ZipArchive { } else { if let Some(p) = outpath.parent() { if !p.exists() { - fs::create_dir_all(&p)?; + fs::create_dir_all(p)?; } } let mut outfile = fs::File::create(&outpath)?; @@ -681,11 +681,11 @@ pub(crate) fn central_header_to_zip_file( reader.read_exact(&mut file_comment_raw)?; let file_name = match is_utf8 { - true => String::from_utf8_lossy(&*file_name_raw).into_owned(), + true => String::from_utf8_lossy(&file_name_raw).into_owned(), false => file_name_raw.clone().from_cp437(), }; let file_comment = match is_utf8 { - true => String::from_utf8_lossy(&*file_comment_raw).into_owned(), + true => String::from_utf8_lossy(&file_comment_raw).into_owned(), false => file_comment_raw.from_cp437(), }; @@ -1085,7 +1085,7 @@ pub fn read_zipfile_from_stream<'a, R: io::Read>( reader.read_exact(&mut extra_field)?; let file_name = match is_utf8 { - true => String::from_utf8_lossy(&*file_name_raw).into_owned(), + true => String::from_utf8_lossy(&file_name_raw).into_owned(), false => file_name_raw.clone().from_cp437(), }; diff --git a/src/write.rs b/src/write.rs index 61ce378c..e43cc85f 100644 --- a/src/write.rs +++ b/src/write.rs @@ -1301,7 +1301,7 @@ fn path_to_string(path: &std::path::Path) -> String { if !path_str.is_empty() { path_str.push('/'); } - path_str.push_str(&*os_str.to_string_lossy()); + path_str.push_str(&os_str.to_string_lossy()); } } path_str