Skip to content

Commit 4529f1e

Browse files
oci: use a newer stdlib Vec API
This wasn't yet stabilized when the code was first written but newer patches have already added the use of this function in other parts of the same file, so this ought to be safe by now.
1 parent 0f63603 commit 4529f1e

File tree

1 file changed

+1
-5
lines changed
  • crates/composefs-oci/src

1 file changed

+1
-5
lines changed

crates/composefs-oci/src/tar.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,7 @@ fn path_from_tar(pax: Option<Box<[u8]>>, gnu: Vec<u8>, short: &[u8]) -> PathBuf
173173
}
174174

175175
// Drop trailing '/' characters in case of directories.
176-
// https://github.com/rust-lang/rust/issues/122741
177-
// path.pop_if(|x| x == &b'/');
178-
if path.last() == Some(&b'/') {
179-
path.pop(); // this is Vec<u8>, so that's a single char.
180-
}
176+
path.pop_if(|x| x == &b'/');
181177

182178
PathBuf::from(OsString::from_vec(path))
183179
}

0 commit comments

Comments
 (0)