Remove aliases for Core and Handle from tokio_core
This commit is contained in:
		
							parent
							
								
									4eb8e65248
								
							
						
					
					
						commit
						76d0780f5a
					
				| @ -16,7 +16,7 @@ use ruma_client::api::r0; | ||||
| use ruma_events::EventType; | ||||
| use ruma_events::room::message::{MessageEventContent, MessageType, TextMessageEventContent}; | ||||
| use ruma_identifiers::RoomAliasId; | ||||
| use tokio_core::reactor::{Core as TokioCore, Handle as TokioHandle}; | ||||
| use tokio_core::reactor::{Core, Handle}; | ||||
| use url::Url; | ||||
| 
 | ||||
| // from https://stackoverflow.com/a/43992218/1592377
 | ||||
| @ -39,7 +39,7 @@ macro_rules! clone { | ||||
| } | ||||
| 
 | ||||
| fn hello_world( | ||||
|     tokio_handle: &TokioHandle, | ||||
|     tokio_handle: &Handle, | ||||
|     homeserver_url: Url, | ||||
| ) -> impl Future<Item = (), Error = ruma_client::Error> + 'static { | ||||
|     let client = Client::https(tokio_handle, homeserver_url, None).unwrap(); | ||||
| @ -69,7 +69,7 @@ fn hello_world( | ||||
| } | ||||
| 
 | ||||
| fn main() { | ||||
|     let mut core = TokioCore::new().unwrap(); | ||||
|     let mut core = Core::new().unwrap(); | ||||
|     let handle = core.handle(); | ||||
|     let server = Url::parse("https://matrix.org/").unwrap(); | ||||
| 
 | ||||
|  | ||||
| @ -18,11 +18,11 @@ use ruma_client::api::r0; | ||||
| use ruma_events::EventType; | ||||
| use ruma_events::room::message::{MessageEventContent, MessageType, TextMessageEventContent}; | ||||
| use ruma_identifiers::RoomAliasId; | ||||
| use tokio_core::reactor::{Core as TokioCore, Handle as TokioHandle}; | ||||
| use tokio_core::reactor::{Core, Handle}; | ||||
| use url::Url; | ||||
| 
 | ||||
| fn hello_world( | ||||
|     tokio_handle: &TokioHandle, | ||||
|     tokio_handle: &Handle, | ||||
|     homeserver_url: Url, | ||||
| ) -> impl Future<Item = (), Error = ruma_client::Error> + 'static { | ||||
|     let client = Client::https(tokio_handle, homeserver_url, None).unwrap(); | ||||
| @ -65,7 +65,7 @@ fn hello_world( | ||||
| } | ||||
| 
 | ||||
| fn main() { | ||||
|     let mut core = TokioCore::new().unwrap(); | ||||
|     let mut core = Core::new().unwrap(); | ||||
|     let handle = core.handle(); | ||||
|     let server = Url::parse("https://matrix.org/").unwrap(); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user