diff --git a/examples/hello_world.rs b/examples/hello_world.rs index 0667cc24..44c22e91 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -21,16 +21,9 @@ use tokio_core::reactor::Core; use url::Url; // from https://stackoverflow.com/a/43992218/1592377 -#[macro_export] macro_rules! clone { (@param _) => ( _ ); (@param $x:ident) => ( $x ); - ($($n:ident),+ => move || $body:expr) => ( - { - $( let $n = $n.clone(); )+ - move || $body - } - ); ($($n:ident),+ => move |$($p:tt),+| $body:expr) => ( { $( let $n = $n.clone(); )+ @@ -42,7 +35,7 @@ macro_rules! clone { fn hello_world( homeserver_url: Url, room: String, -) -> impl Future + 'static { +) -> impl Future { let client = Client::https(homeserver_url, None).unwrap(); client.register_guest().and_then(clone!(client => move |_| { diff --git a/examples/hello_world_await.rs b/examples/hello_world_await.rs index 124c8283..4e321da2 100644 --- a/examples/hello_world_await.rs +++ b/examples/hello_world_await.rs @@ -25,7 +25,7 @@ use url::Url; fn hello_world( homeserver_url: Url, room: String, -) -> impl Future + 'static { +) -> impl Future { let client = Client::https(homeserver_url, None).unwrap(); async_block! {