From 5e399dba2632941e7c45cb7a37f401b369f3bcff Mon Sep 17 00:00:00 2001 From: bitfl0wer Date: Wed, 3 May 2023 17:12:32 +0200 Subject: [PATCH] Add get_as_mut to Limits --- src/api/policies/instance/limits.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/policies/instance/limits.rs b/src/api/policies/instance/limits.rs index 7c4b624..58d55c5 100644 --- a/src/api/policies/instance/limits.rs +++ b/src/api/policies/instance/limits.rs @@ -304,6 +304,10 @@ pub mod limits { map } + pub fn get_as_mut(&mut self) -> &mut Limits { + self + } + /// check_limits uses the API to get the current request limits of the instance. /// It returns a `Limits` struct containing all the limits. /// If the rate limit is disabled, then the limit is set to `u64::MAX`.