mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
fix clippy
This commit is contained in:
parent
5ccefb8333
commit
f6c4701932
1 changed files with 9 additions and 9 deletions
|
@ -156,15 +156,17 @@ where
|
|||
match this.senders.pin().get(&chat_id) {
|
||||
// An old dialogue
|
||||
Some(tx) => {
|
||||
if tx.send(cx).is_err() {
|
||||
panic!("We are not dropping a receiver or call .close() on it",);
|
||||
}
|
||||
assert!(
|
||||
tx.send(cx).is_ok(),
|
||||
"We are not dropping a receiver or call .close() on it"
|
||||
);
|
||||
}
|
||||
None => {
|
||||
let tx = this.new_tx();
|
||||
if tx.send(cx).is_err() {
|
||||
panic!("We are not dropping a receiver or call .close() on it",);
|
||||
}
|
||||
assert!(
|
||||
tx.send(cx).is_ok(),
|
||||
"We are not dropping a receiver or call .close() on it"
|
||||
);
|
||||
this.senders.pin().insert(chat_id, tx);
|
||||
}
|
||||
}
|
||||
|
@ -271,9 +273,7 @@ mod tests {
|
|||
let tx = tx.clone();
|
||||
|
||||
async move {
|
||||
if tx.send(update).is_err() {
|
||||
panic!("tx.send(update) failed");
|
||||
}
|
||||
assert!(tx.send(update).is_ok(), "tx.send(update) failed");
|
||||
}
|
||||
})
|
||||
.await;
|
||||
|
|
Loading…
Reference in a new issue