From 959d0c52b15baaf07072bb48d3cc67cc0a419ae6 Mon Sep 17 00:00:00 2001 From: Jurijs Bibicevs <60851943+jurijsb@users.noreply.github.com> Date: Sun, 6 Oct 2024 18:30:11 +0200 Subject: [PATCH] :recycle: refactor: replace deprecated `per_second` with `seconds_per_request` in rate-limiting middleware code (#616) --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index b7f0d71..3e4ae2c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -91,7 +91,7 @@ pub fn run( .wrap(cors) .wrap(Governor::new( &GovernorConfigBuilder::default() - .per_second(config.rate_limiter.time_limit as u64) + .seconds_per_request(config.rate_limiter.time_limit as u64) .burst_size(config.rate_limiter.number_of_requests as u32) .finish() .unwrap(),