diff --git a/src/compression/tar/tar-strip-prefix.md b/src/compression/tar/tar-strip-prefix.md index a770871..dd2f0ab 100644 --- a/src/compression/tar/tar-strip-prefix.md +++ b/src/compression/tar/tar-strip-prefix.md @@ -20,7 +20,7 @@ use tar::Archive; # } # } -fn main() -> Result<()> { +fn main() -> Result<(), std::io::Error> { let file = File::open("archive.tar.gz")?; let mut archive = Archive::new(GzDecoder::new(file)); let prefix = "bundle/logs"; @@ -29,7 +29,7 @@ fn main() -> Result<()> { archive .entries()? .filter_map(|e| e.ok()) - .map(|mut entry| -> Result { + .map(|mut entry| -> Result> { let path = entry.path()?.strip_prefix(prefix)?.to_owned(); entry.unpack(&path)?; Ok(path)