Skip to content

Commit 221be11

Browse files
authored
refactor: loosen retry for_host parameter bounds (#2792)
previously this would not accept &'static str
1 parent acd1b05 commit 221be11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/retry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ pub(crate) struct Policy {
7373
/// [`Builder::scoped()`].
7474
pub fn for_host<S>(host: S) -> Builder
7575
where
76-
S: PartialEq<str> + Send + Sync + 'static,
76+
S: for<'a> PartialEq<&'a str> + Send + Sync + 'static,
7777
{
78-
scoped(move |req| &host == req.uri().host().unwrap_or(""))
78+
scoped(move |req| host == req.uri().host().unwrap_or(""))
7979
}
8080

8181
/// Create a retry policy that will never retry any request.

0 commit comments

Comments
 (0)