sys: add truncate option to OpenOptions in test case

this resolves a clippy lint that checks for uses of `create()` without
`truncate()` [1].

[1]:
https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_open_options

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
This commit is contained in:
Shannon Sterz 2025-03-06 13:43:37 +01:00 committed by Wolfgang Bumiller
parent 946d95cfcd
commit 92ecc301b6

View File

@ -14,6 +14,7 @@ fn test_fsetxattr_fgetxattr() {
let file = OpenOptions::new() let file = OpenOptions::new()
.write(true) .write(true)
.create(true) .create(true)
.truncate(true)
.open(&path) .open(&path)
.unwrap(); .unwrap();