From bb96724454e38069c7e3af26597cf550f8454c8b Mon Sep 17 00:00:00 2001 From: Jacob Date: Wed, 22 Apr 2026 00:27:11 -0400 Subject: [PATCH] fix: check for `NotFound` error at the correct site in `OperatorExt::async_reader_if_exists` --- src/operator_ext.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/operator_ext.rs b/src/operator_ext.rs index 59a3d44..5a21d29 100644 --- a/src/operator_ext.rs +++ b/src/operator_ext.rs @@ -15,8 +15,9 @@ impl Operator { &self, path: &str, ) -> Result, Error> { - match self.reader(path).await { - Ok(reader) => Ok(Some(reader.into_futures_async_read(..).await?)), + let reader = self.reader(path).await?; + match reader.into_futures_async_read(..).await { + Ok(reader) => Ok(Some(reader)), Err(error) if matches!(error.kind(), ErrorKind::NotFound) => Ok(None), Err(error) => Err(error), }