mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-07 02:59:41 +01:00
Fix Clippy
This commit is contained in:
parent
65c98741db
commit
8deaac04fa
1 changed files with 3 additions and 3 deletions
|
@ -259,9 +259,9 @@ async fn worker(limits: Limits, mut rx: mpsc::Receiver<(ChatIdHash, Sender<Never
|
|||
|
||||
while let Some(entry) = queue_removing.next() {
|
||||
let chat = &entry.value().0;
|
||||
let requests_sent = requests_sent.per_sec.get(chat).copied().unwrap_or(0);
|
||||
let limits_not_exceeded = requests_sent < limits.messages_per_sec_chat
|
||||
&& requests_sent < limits.messages_per_min_chat;
|
||||
let requests_sent_count = requests_sent.per_sec.get(chat).copied().unwrap_or(0);
|
||||
let limits_not_exceeded = requests_sent_count < limits.messages_per_sec_chat
|
||||
&& requests_sent_count < limits.messages_per_min_chat;
|
||||
|
||||
if limits_not_exceeded {
|
||||
*requests_sent.per_sec.entry(*chat).or_insert(0) += 1;
|
||||
|
|
Loading…
Reference in a new issue