Commit 49269a2551
Unsigned
Layout: unified · split
src/room/mod.rs +4 −1
| @@ -676,11 +676,14 @@ impl MatrixRoom { | |||
| 676 | let room_id = self.room_id.clone(); | 676 | let room_id = self.room_id.clone(); |
| 677 | let typing_notice_time = self.typing_notice_time.clone(); | 677 | let typing_notice_time = self.typing_notice_time.clone(); |
| 678 | 678 | ||
| 679 | #[allow(clippy::await_holding_lock)] | ||
| 679 | let send = |typing: bool| async move { | 680 | let send = |typing: bool| async move { |
| 680 | let typing_time = typing_notice_time; | 681 | let typing_time = typing_notice_time; |
| 681 | 682 | ||
| 682 | // We're in the process of sending out a typing notice, so don't | 683 | // We're in the process of sending out a typing notice, so don't |
| 683 | // make the same request twice. | 684 | // make the same request twice. It's fine to hold on to this lock |
| 685 | // accross the await point since we're not going to try to lock it | ||
| 686 | // anywhere else. | ||
| 684 | let guard = match typing_in_flight.try_lock() { | 687 | let guard = match typing_in_flight.try_lock() { |
| 685 | Ok(guard) => guard, | 688 | Ok(guard) => guard, |
| 686 | Err(_) => { | 689 | Err(_) => { |