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 38097c5493bfae9b1e86dadcb9871c78c21b5a26 Author: Xuanwo <[email protected]> AuthorDate: Tue Jan 23 22:47:46 2024 +0800 Format code Signed-off-by: Xuanwo <[email protected]> --- core/src/layers/timeout.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/layers/timeout.rs b/core/src/layers/timeout.rs index 6450726f76..a8957bca77 100644 --- a/core/src/layers/timeout.rs +++ b/core/src/layers/timeout.rs @@ -55,7 +55,7 @@ use crate::*; /// # Examples /// /// The following examples will create a timeout layer with 10 seconds timeout for all non-io -/// operations, 3 seconds timeout for all io operations and 2 consecutive io timeouts are allowed. +/// operations, 3 seconds timeout for all io operations. /// /// ``` /// use anyhow::Result; @@ -67,7 +67,9 @@ use crate::*; /// /// let _ = Operator::new(services::Memory::default()) /// .expect("must init") -/// .layer(TimeoutLayer::default().with_timeout(Duration::from_secs(10)).with_io_timeout(3)) +/// .layer(TimeoutLayer::default() +/// .with_timeout(Duration::from_secs(10)) +/// .with_io_timeout(Duration::from_secs(3))) /// .finish(); /// ``` #[derive(Clone)]
