File tree Expand file tree Collapse file tree 4 files changed +0
-28
lines changed Expand file tree Collapse file tree 4 files changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,6 @@ impl RetryPolicy for DowngradingConsistencyRetryPolicy {
3030 fn new_session ( & self ) -> Box < dyn RetrySession > {
3131 Box :: new ( DowngradingConsistencyRetrySession :: new ( ) )
3232 }
33-
34- fn clone_boxed ( & self ) -> Box < dyn RetryPolicy > {
35- Box :: new ( DowngradingConsistencyRetryPolicy )
36- }
3733}
3834
3935pub struct DowngradingConsistencyRetrySession {
Original file line number Diff line number Diff line change @@ -29,15 +29,6 @@ pub enum RetryDecision {
2929pub trait RetryPolicy : std:: fmt:: Debug + Send + Sync {
3030 /// Called for each new query, starts a session of deciding about retries
3131 fn new_session ( & self ) -> Box < dyn RetrySession > ;
32-
33- /// Used to clone this RetryPolicy
34- fn clone_boxed ( & self ) -> Box < dyn RetryPolicy > ;
35- }
36-
37- impl Clone for Box < dyn RetryPolicy > {
38- fn clone ( & self ) -> Box < dyn RetryPolicy > {
39- self . clone_boxed ( )
40- }
4132}
4233
4334/// Used throughout a single query to decide when to retry it
@@ -71,10 +62,6 @@ impl RetryPolicy for FallthroughRetryPolicy {
7162 fn new_session ( & self ) -> Box < dyn RetrySession > {
7263 Box :: new ( FallthroughRetrySession )
7364 }
74-
75- fn clone_boxed ( & self ) -> Box < dyn RetryPolicy > {
76- Box :: new ( FallthroughRetryPolicy )
77- }
7865}
7966
8067impl RetrySession for FallthroughRetrySession {
@@ -106,10 +93,6 @@ impl RetryPolicy for DefaultRetryPolicy {
10693 fn new_session ( & self ) -> Box < dyn RetrySession > {
10794 Box :: new ( DefaultRetrySession :: new ( ) )
10895 }
109-
110- fn clone_boxed ( & self ) -> Box < dyn RetryPolicy > {
111- Box :: new ( DefaultRetryPolicy )
112- }
11396}
11497
11598pub struct DefaultRetrySession {
Original file line number Diff line number Diff line change @@ -2708,9 +2708,6 @@ async fn test_iter_works_when_retry_policy_returns_ignore_write_error() {
27082708 fn new_session ( & self ) -> Box < dyn RetrySession > {
27092709 Box :: new ( MyRetrySession ( self . 0 . clone ( ) ) )
27102710 }
2711- fn clone_boxed ( & self ) -> Box < dyn RetryPolicy > {
2712- Box :: new ( MyRetryPolicy ( self . 0 . clone ( ) ) )
2713- }
27142711 }
27152712
27162713 struct MyRetrySession ( Arc < AtomicBool > ) ;
Original file line number Diff line number Diff line change @@ -95,10 +95,6 @@ impl<const NODE: u8> RetryPolicy for BoundToPredefinedNodePolicy<NODE> {
9595 self . report_node ( Report :: RetryPolicy ) ;
9696 Box :: new ( self . clone ( ) )
9797 }
98-
99- fn clone_boxed ( & self ) -> Box < dyn RetryPolicy > {
100- Box :: new ( self . clone ( ) )
101- }
10298}
10399
104100impl < const NODE : u8 > RetrySession for BoundToPredefinedNodePolicy < NODE > {
You can’t perform that action at this time.
0 commit comments