Commit c8cdbac48b

c8cdbac48bcb1dcd1a8c7e5e15e0558c99792706

parent: 15663ba513

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2020-10-17 08:25 UTC

weechat-matrix: Remove the need for async closures.

Layout: unified · split

src/connection.rs +1 −1
@@ -403,7 +403,7 @@ impl Connection {
403 let sync_channel = &channel; 403 let sync_channel = &channel;
404 404
405 client 405 client
406 .sync_with_callback(sync_settings, async move |response| { 406 .sync_with_callback(sync_settings, |response| async move {
407 let channel = sync_channel; 407 let channel = sync_channel;
408 408
409 for (room_id, room) in response.rooms.join { 409 for (room_id, room) in response.rooms.join {
src/lib.rs −1
@@ -1,4 +1,3 @@
1#![feature(async_closure)]
2#![feature(get_mut_unchecked)] 1#![feature(get_mut_unchecked)]
3 2
4mod commands; 3mod commands;
src/room/mod.rs +1 −1
@@ -583,7 +583,7 @@ impl MatrixRoom {
583 let room_id = self.room_id.clone(); 583 let room_id = self.room_id.clone();
584 let typing_notice_time = self.typing_notice_time.clone(); 584 let typing_notice_time = self.typing_notice_time.clone();
585 585
586 let send = async move |typing: bool| { 586 let send = |typing: bool| async move {
587 let typing_time = typing_notice_time; 587 let typing_time = typing_notice_time;
588 588
589 // We're in the process of sending out a typing notice, so don't 589 // We're in the process of sending out a typing notice, so don't