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), }