style: format code

This commit is contained in:
Suyunmeng
2025-11-08 10:09:02 +08:00
parent 54b98f1621
commit 2bebb6a48b

View File

@@ -12,7 +12,7 @@ fn normalize_path(path: &PathBuf) -> Result<PathBuf, String> {
let canonical = path
.canonicalize()
.map_err(|e| format!("Failed to canonicalize path: {e}"))?;
let path_str = canonical.to_string_lossy();
if let Some(stripped) = path_str.strip_prefix(r"\\?\") {
Ok(PathBuf::from(stripped))
@@ -20,7 +20,7 @@ fn normalize_path(path: &PathBuf) -> Result<PathBuf, String> {
Ok(canonical)
}
}
#[cfg(not(target_os = "windows"))]
{
path.canonicalize()