make ratelimit section optional (#168)

This commit is contained in:
Adil Hafeez 2024-10-09 19:53:00 -07:00 committed by GitHub
parent f9e3a052fc
commit 6b70768170
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 20 deletions

View file

@ -404,6 +404,14 @@ mod test {
use std::num::NonZero;
use std::thread;
#[test]
fn make_ratelimits_optional() {
let ratelimits_config = Vec::new();
// Initialize in the main thread.
ratelimits(Some(ratelimits_config));
}
#[test]
fn different_threads_have_same_ratelimit_data_structure() {
let ratelimits_config = Some(vec![Ratelimit {