chore: declare and check MSRV (#1034)

* chore: declare and check MSRV

* fix: clippy fixes for collapsing if-statements

* ci: add explicit contents read permission to MSRV job
This commit is contained in:
Jack Amadeo 2026-07-23 15:59:55 -04:00 • committed by GitHub
commit 76988023b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -178,10 +178,10 @@ pub struct FixedInterval {
impl SseRetryPolicy for FixedInterval {
fn retry(&self, current_times: usize) -> Option<Duration> {
if let Some(max_times) = self.max_times {
if current_times >= max_times {
return None;
}
if let Some(max_times) = self.max_times
&& current_times >= max_times
{
return None;
}
Some(self.duration)
}
@ -222,10 +222,10 @@ impl Default for ExponentialBackoff {
impl SseRetryPolicy for ExponentialBackoff {
fn retry(&self, current_times: usize) -> Option<Duration> {
if let Some(max_times) = self.max_times {
if current_times >= max_times {
return None;
}
if let Some(max_times) = self.max_times
&& current_times >= max_times
{
return None;
}
Some(self.base_duration * (2u32.pow(current_times as u32)))
}