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:
Wolfgang Bumiller 2019-12-18 10:04:21 +01:00
parent 2387f9ef2b
commit 4bce3d76a2

View File

@ -74,9 +74,8 @@ pub fn file_read_firstline<P: AsRef<Path>>(path: P) -> Result<String, Error> {
pub fn replace_file<P: AsRef<Path>>(
path: P,
data: &[u8],
options: Option<CreateOptions>,
options: CreateOptions,
) -> Result<(), Error> {
let options = options.unwrap_or_default();
file_set_contents_full(
path.as_ref(),
data,