diff --git a/src/read.rs b/src/read.rs index d2eb4bf1..5c19b955 100644 --- a/src/read.rs +++ b/src/read.rs @@ -243,7 +243,7 @@ impl<R: Read + io::Seek> ZipArchive<R> { /// # Platform-specific behaviour /// /// On unix systems permissions from the zip file are preserved, if they exist. - pub fn extract(&mut self, directory: &dyn AsRef<Path>) -> ZipResult<()> { + pub fn extract<P: AsRef<Path>>(&mut self, directory: P) -> ZipResult<()> { for i in 0..self.len() { let mut file = self.by_index(i)?; let filepath = file.sanitized_name();