From fe489186da81b67eb9bfb16b49f241b4ac9ad87d Mon Sep 17 00:00:00 2001 From: simonsan <14062932+simonsan@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:41:26 +0100 Subject: [PATCH] chore(core/blocking_operator): deduplicate deprecated `is_exist` logic (#5261) --- core/src/types/operator/blocking_operator.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/core/src/types/operator/blocking_operator.rs b/core/src/types/operator/blocking_operator.rs index 47f48d016512..38a95357f653 100644 --- a/core/src/types/operator/blocking_operator.rs +++ b/core/src/types/operator/blocking_operator.rs @@ -306,14 +306,7 @@ impl BlockingOperator { /// ``` #[deprecated(note = "rename to `exists` for consistence with `std::fs::exists`")] pub fn is_exist(&self, path: &str) -> Result { - let r = self.stat(path); - match r { - Ok(_) => Ok(true), - Err(err) => match err.kind() { - ErrorKind::NotFound => Ok(false), - _ => Err(err), - }, - } + self.exists(path) } /// Create a dir at given path.