We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc8767b commit fa7a71dCopy full SHA for fa7a71d
src/compression/tar/tar-strip-prefix.md
@@ -20,7 +20,7 @@ use tar::Archive;
20
# }
21
22
23
-fn main() -> Result<()> {
+fn main() -> Result<(), std::io::Error> {
24
let file = File::open("archive.tar.gz")?;
25
let mut archive = Archive::new(GzDecoder::new(file));
26
let prefix = "bundle/logs";
@@ -29,7 +29,7 @@ fn main() -> Result<()> {
29
archive
30
.entries()?
31
.filter_map(|e| e.ok())
32
- .map(|mut entry| -> Result<PathBuf> {
+ .map(|mut entry| -> Result<PathBuf, Box<dyn std::error::Error>> {
33
let path = entry.path()?.strip_prefix(prefix)?.to_owned();
34
entry.unpack(&path)?;
35
Ok(path)
0 commit comments