From 782cd275808d6ecc4a90125f806adc30db788643 Mon Sep 17 00:00:00 2001 From: Talison Fabio <54823205+talis-fb@users.noreply.github.com> Date: Sat, 22 Mar 2025 20:24:16 -0300 Subject: [PATCH] fix: remove unused clear_path function --- src/utils/fs.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/utils/fs.rs b/src/utils/fs.rs index f1be647..b92e909 100644 --- a/src/utils/fs.rs +++ b/src/utils/fs.rs @@ -19,20 +19,6 @@ pub fn is_path_stdin(path: &Path) -> bool { path.as_os_str() == "-" } -/// Remove `path` asking the user to overwrite if necessary. -/// -/// * `Ok(true)` means the path is clear, -/// * `Ok(false)` means the user doesn't want to overwrite -/// * `Err(_)` is an error -pub fn clear_path(path: &Path, question_policy: QuestionPolicy) -> crate::Result { - if path.exists() && !user_wants_to_overwrite(path, question_policy)? { - return Ok(false); - } - - remove_file_or_dir(path)?; - - Ok(true) -} pub fn resolve_path(path: &Path, question_policy: QuestionPolicy) -> crate::Result> { if path.exists() {