Use Hyper::Body as default for Endpoint

This makes many code more compact.
This commit is contained in:
Jörg Sommer 2018-08-31 12:35:44 +02:00
parent 08c0d14221
commit d4578a835d

View File

@ -28,9 +28,10 @@ use std::io;
use futures::future::FutureFrom;
use http::{Method, Request, Response, StatusCode};
use hyper::Body;
/// 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.
type Request: TryInto<Request<T>, Error = Error>;
/// Data returned from the endpoint.