diff options
author | Alex Auvolat <alex@adnab.me> | 2021-12-09 12:20:37 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-12-09 12:20:37 +0100 |
commit | e4942490ee6f51573223772ceee8a8ac46b55ae6 (patch) | |
tree | 5500ce3ba4a4b9f43221f92bf7a714d70b024f49 /src/proxy_config.rs | |
parent | fdb83162ce9979184a9d680c5ec4f64235497485 (diff) | |
download | tricot-e4942490ee6f51573223772ceee8a8ac46b55ae6.tar.gz tricot-e4942490ee6f51573223772ceee8a8ac46b55ae6.zip |
Cargo clippydocker-19
Diffstat (limited to 'src/proxy_config.rs')
-rw-r--r-- | src/proxy_config.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/proxy_config.rs b/src/proxy_config.rs index 820d40a..deb2ffe 100644 --- a/src/proxy_config.rs +++ b/src/proxy_config.rs @@ -86,10 +86,10 @@ fn retry_to_time(retries: u32, max_time: Duration) -> Duration { // 1.2^x seems to be a good value to exponentially increase time at a good pace // eg. 1.2^32 = 341 seconds ~= 5 minutes - ie. after 32 retries we wait 5 // minutes - return Duration::from_secs(cmp::min( + Duration::from_secs(cmp::min( max_time.as_secs(), 1.2f64.powf(retries as f64) as u64, - )); + )) } fn parse_tricot_tag( |