ksud: minor tweaks
This commit is contained in:
@@ -45,7 +45,11 @@ pub fn ensure_dir_exists<T: AsRef<Path>>(dir: T) -> Result<()> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn ensure_binary<T: AsRef<Path>>(path: T, contents: &[u8], ignore_if_exist: bool) -> Result<()> {
|
||||
pub fn ensure_binary<T: AsRef<Path>>(
|
||||
path: T,
|
||||
contents: &[u8],
|
||||
ignore_if_exist: bool,
|
||||
) -> Result<()> {
|
||||
if ignore_if_exist && path.as_ref().exists() {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user