mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-12 12:19:20 +00:00
tools: replace_file, make options not an option...
CreateOptions::new() creates an all-None option set anyway Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
2387f9ef2b
commit
4bce3d76a2
@ -74,9 +74,8 @@ pub fn file_read_firstline<P: AsRef<Path>>(path: P) -> Result<String, Error> {
|
|||||||
pub fn replace_file<P: AsRef<Path>>(
|
pub fn replace_file<P: AsRef<Path>>(
|
||||||
path: P,
|
path: P,
|
||||||
data: &[u8],
|
data: &[u8],
|
||||||
options: Option<CreateOptions>,
|
options: CreateOptions,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
let options = options.unwrap_or_default();
|
|
||||||
file_set_contents_full(
|
file_set_contents_full(
|
||||||
path.as_ref(),
|
path.as_ref(),
|
||||||
data,
|
data,
|
||||||
|
Loading…
Reference in New Issue
Block a user