This is an automated email from the ASF dual-hosted git repository. xuanwo pushed a commit to branch fix-timeout-layer in repository https://gitbox.apache.org/repos/asf/opendal.git
commit e5eb1271bba79b440116c89f2dc4c5933065abda Author: Xuanwo <[email protected]> AuthorDate: Tue Jan 23 22:46:37 2024 +0800 Format code Signed-off-by: Xuanwo <[email protected]> --- core/src/layers/timeout.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/layers/timeout.rs b/core/src/layers/timeout.rs index 77e55c6012..6450726f76 100644 --- a/core/src/layers/timeout.rs +++ b/core/src/layers/timeout.rs @@ -323,18 +323,18 @@ impl<R: oio::Write> oio::Write for TimeoutWrapper<R> { Poll::Ready(v) } - fn poll_abort(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>> { - self.poll_timeout(cx, WriteOperation::Abort.into_static())?; + fn poll_close(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>> { + self.poll_timeout(cx, WriteOperation::Close.into_static())?; - let v = ready!(self.inner.poll_abort(cx)); + let v = ready!(self.inner.poll_close(cx)); self.sleep = None; Poll::Ready(v) } - fn poll_close(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>> { - self.poll_timeout(cx, WriteOperation::Close.into_static())?; + fn poll_abort(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>> { + self.poll_timeout(cx, WriteOperation::Abort.into_static())?; - let v = ready!(self.inner.poll_close(cx)); + let v = ready!(self.inner.poll_abort(cx)); self.sleep = None; Poll::Ready(v) }
