mirror of
https://git.proxmox.com/git/proxmox
synced 2025-04-29 18:45:49 +00:00
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:
parent
946d95cfcd
commit
92ecc301b6
@ -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();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user