Fix too many 429 response (#1231)

Fixed #1229

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-08-08 10:53:15 +10:00 committed by GitHub
parent e4c776f403
commit 435df675b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 228 additions and 132 deletions

View file

@ -164,7 +164,7 @@ impl FromStr for Registry {
#[cfg(test)]
mod test {
use std::time::Duration;
use std::num::NonZeroU16;
use toml_edit::ser::to_string;
@ -176,7 +176,7 @@ mod test {
Client::new(
concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION")),
None,
Duration::from_millis(10),
NonZeroU16::new(10).unwrap(),
1.try_into().unwrap(),
[],
)