Skip to content

Commit 8deba19

Browse files
committed
manifest_schema: directly get a vector of the size we want
1 parent e1842e9 commit 8deba19

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/manifest_schema.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,7 @@ fn test_xattr() {
845845
let path: PathBuf = temp.path("empty");
846846
let file = File::open(&path).expect("should be able to open file");
847847

848-
let mut buf = Vec::<u8>::new();
849-
buf.resize(XATTR_MAX_VALUE_SIZE, 0u8);
848+
let mut buf = vec![0; XATTR_MAX_VALUE_SIZE];
850849
let initial_ret = unsafe {
851850
verneuil__getxattr(
852851
file.as_raw_fd(),

0 commit comments

Comments
 (0)