1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2025-06-27 16:35:59 +00:00

use ::MIN

This commit is contained in:
Matthias Ahouansou 2024-07-09 13:38:36 +01:00
parent e20fcb029a
commit bf902f1607
No known key found for this signature in database

View file

@ -353,16 +353,16 @@ fn default_openid_token_ttl() -> u64 {
} }
fn default_non_zero() -> NonZeroU64 { fn default_non_zero() -> NonZeroU64 {
NonZeroU64::new(1).unwrap() NonZeroU64::MIN
} }
pub fn default_rate_limit() -> BTreeMap<Restriction, Limitation> { pub fn default_rate_limit() -> BTreeMap<Restriction, Limitation> {
BTreeMap::from_iter([( BTreeMap::from_iter([(
Restriction::default(), Restriction::default(),
Limitation { Limitation {
timeframe: Timeframe::PerMinute(default_non_zero()), timeframe: Timeframe::PerMinute(NonZeroU64::MIN),
burst_capacity: default_non_zero(), burst_capacity: NonZeroU64::MIN,
weight: default_non_zero(), weight: NonZeroU64::MIN,
}, },
)]) )])
} }