From bdb27a1e9357328de93a2f1b1f1b6d1468e8c352 Mon Sep 17 00:00:00 2001 From: bherbruck Date: Thu, 8 Oct 2026 07:22:56 +0000 Subject: [PATCH] safe_write: no unused import on wasm Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL --- crates/io/src/safe_write.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/io/src/safe_write.rs b/crates/io/src/safe_write.rs index 61a31910..65109953 100644 --- a/crates/io/src/safe_write.rs +++ b/crates/io/src/safe_write.rs @@ -3,7 +3,7 @@ //! leaves the old file or the new one, never a torn mix. The previous version can be kept as //! `.bak` (itself written the same way). -use std::fs::{self, File, OpenOptions}; +use std::fs::{self, OpenOptions}; use std::io::Write; use std::path::{Path, PathBuf}; @@ -30,7 +30,7 @@ fn write_synced(path: &Path, bytes: &[u8]) -> std::io::Result<()> { fn sync_dir(path: &Path) { #[cfg(unix)] if let Some(dir) = path.parent().filter(|d| !d.as_os_str().is_empty()) - && let Ok(d) = File::open(dir) + && let Ok(d) = fs::File::open(dir) { let _ = d.sync_all(); }