Use Hyper::Body as default for Endpoint
				
					
				
			This makes many code more compact.
This commit is contained in:
		
							parent
							
								
									08c0d14221
								
							
						
					
					
						commit
						d4578a835d
					
				| @ -28,9 +28,10 @@ use std::io; | |||||||
| 
 | 
 | ||||||
| use futures::future::FutureFrom; | use futures::future::FutureFrom; | ||||||
| use http::{Method, Request, Response, StatusCode}; | use http::{Method, Request, Response, StatusCode}; | ||||||
|  | use hyper::Body; | ||||||
| 
 | 
 | ||||||
| /// A Matrix API endpoint.
 | /// A Matrix API endpoint.
 | ||||||
| pub trait Endpoint<T, U> { | pub trait Endpoint<T = Body, U = Body> { | ||||||
|     /// Data needed to make a request to the endpoint.
 |     /// Data needed to make a request to the endpoint.
 | ||||||
|     type Request: TryInto<Request<T>, Error = Error>; |     type Request: TryInto<Request<T>, Error = Error>; | ||||||
|     /// Data returned from the endpoint.
 |     /// Data returned from the endpoint.
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user