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] | ||||
| ruma-events = "0.11.0" | ||||
| tokio-core = "0.1.17" | ||||
| tokio = "0.1" | ||||
| 
 | ||||
| [features] | ||||
| default = ["tls"] | ||||
|  | ||||
| @ -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); () })); | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user