Use tokio for hello_world example
The crate tokio-core is deprecated.
This commit is contained in:
parent
7cf5ac80c8
commit
e0f20ba0d0
@ -32,7 +32,7 @@ version = "0.2.2"
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
ruma-events = "0.11.0"
|
ruma-events = "0.11.0"
|
||||||
tokio-core = "0.1.17"
|
tokio = "0.1"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["tls"]
|
default = ["tls"]
|
||||||
|
@ -9,7 +9,6 @@ use ruma_events::{
|
|||||||
EventType,
|
EventType,
|
||||||
};
|
};
|
||||||
use ruma_identifiers::RoomAliasId;
|
use ruma_identifiers::RoomAliasId;
|
||||||
use tokio_core::reactor::Core;
|
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
// from https://stackoverflow.com/a/43992218/1592377
|
// from https://stackoverflow.com/a/43992218/1592377
|
||||||
@ -66,8 +65,6 @@ fn main() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Core::new()
|
tokio::run(hello_world(homeserver_url.parse().unwrap(), room)
|
||||||
.unwrap()
|
.map_err(|e| { dbg!(e); () }));
|
||||||
.run(hello_world(homeserver_url.parse().unwrap(), room))
|
|
||||||
.unwrap();
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user