From 1c34c4ab28134595a7f10f1e24577af757612a38 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Wed, 4 Sep 2024 19:47:30 +0800 Subject: [PATCH] refactor: Remove the Debug requirement of Backoff (#141) Signed-off-by: Xuanwo --- backon/src/backoff/api.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backon/src/backoff/api.rs b/backon/src/backoff/api.rs index 3f8994c..2481618 100644 --- a/backon/src/backoff/api.rs +++ b/backon/src/backoff/api.rs @@ -1,8 +1,7 @@ -use core::fmt::Debug; use core::time::Duration; /// BackoffBuilder is utilized to construct a new backoff. -pub trait BackoffBuilder: Debug + Send + Sync + Unpin { +pub trait BackoffBuilder: Send + Sync + Unpin { /// The associated backoff returned by this builder. type Backoff: Backoff; @@ -15,4 +14,4 @@ pub trait BackoffBuilder: Debug + Send + Sync + Unpin { /// - `Some(Duration)` indicates the caller should `sleep(Duration)` and retry the request. /// - `None` indicates the limits have been reached, and the caller should return the current error instead. pub trait Backoff: Iterator + Send + Sync + Unpin {} -impl Backoff for T where T: Iterator + Debug + Send + Sync + Unpin {} +impl Backoff for T where T: Iterator + Send + Sync + Unpin {}