Use tokio for hello_world example

The crate tokio-core is deprecated.
This commit is contained in:
Jörg Sommer 2019-01-22 10:38:31 +01:00
parent 7cf5ac80c8
commit e0f20ba0d0
2 changed files with 3 additions and 6 deletions

View File

@ -32,7 +32,7 @@ version = "0.2.2"
[dev-dependencies]
ruma-events = "0.11.0"
tokio-core = "0.1.17"
tokio = "0.1"
[features]
default = ["tls"]

View File

@ -9,7 +9,6 @@ use ruma_events::{
EventType,
};
use ruma_identifiers::RoomAliasId;
use tokio_core::reactor::Core;
use url::Url;
// from https://stackoverflow.com/a/43992218/1592377
@ -66,8 +65,6 @@ fn main() {
}
};
Core::new()
.unwrap()
.run(hello_world(homeserver_url.parse().unwrap(), room))
.unwrap();
tokio::run(hello_world(homeserver_url.parse().unwrap(), room)
.map_err(|e| { dbg!(e); () }));
}