Merge pull request #2636 from zeroclaw-labs/refactor/update-remove-unused-import

refactor(update): remove unused ErrorKind import
This commit is contained in:
killf 2026-03-03 20:31:38 +08:00 committed by GitHub
commit c89fc6efa9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,6 @@
use anyhow::{bail, Context, Result};
use std::env;
use std::fs;
use std::io::ErrorKind;
use std::path::{Path, PathBuf};
use std::process::Command;
@ -329,7 +328,7 @@ fn replace_binary(new_binary: &Path, current_exe: &Path) -> Result<()> {
.context("Failed to set permissions on staged binary")?;
if let Err(err) = fs::remove_file(&backup_path) {
if err.kind() != ErrorKind::NotFound {
if err.kind() != std::io::ErrorKind::NotFound {
return Err(err).context("Failed to remove stale backup binary");
}
}