Skip to content

Commit fd0a554

Browse files
committed
install: Fix another clippy lint
Signed-off-by: Colin Walters <[email protected]>
1 parent af7d664 commit fd0a554

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

crates/lib/src/install.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,13 +2126,9 @@ pub(crate) fn write_composefs_state(
21262126
std::fs::create_dir_all(COMPOSEFS_TRANSIENT_STATE_DIR)
21272127
.with_context(|| format!("Creating {COMPOSEFS_TRANSIENT_STATE_DIR}"))?;
21282128

2129-
let mut file = std::fs::OpenOptions::new()
2130-
.write(true)
2131-
.create(true)
2132-
.open(COMPOSEFS_STAGED_DEPLOYMENT_PATH)
2133-
.context("Opening staged-deployment file")?;
2134-
2135-
file.write_all(deployment_id.to_hex().as_bytes())?;
2129+
let buf = deployment_id.to_hex();
2130+
std::fs::write(COMPOSEFS_STAGED_DEPLOYMENT_PATH, buf)
2131+
.with_context(|| format!("Writing {COMPOSEFS_STAGED_DEPLOYMENT_PATH}"))?;
21362132
}
21372133

21382134
Ok(())

0 commit comments

Comments
 (0)