Simplify by removing genericity.
Nothing to be generic over
This commit is contained in:
parent
6f94b2f960
commit
db4f18807d
2 changed files with 3 additions and 2 deletions
|
@ -157,10 +157,11 @@ impl Resource for ArticleResource {
|
||||||
).boxed()
|
).boxed()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn put<S: 'static + futures::Stream<Item=hyper::Chunk, Error=hyper::Error> + Send + Sync>(self, body: S) -> futures::BoxFuture<Response, Box<::std::error::Error + Send + Sync>> {
|
fn put(self, body: hyper::Body) -> futures::BoxFuture<Response, Box<::std::error::Error + Send + Sync>> {
|
||||||
// TODO Check incoming Content-Type
|
// TODO Check incoming Content-Type
|
||||||
|
|
||||||
use chrono::{TimeZone, Local};
|
use chrono::{TimeZone, Local};
|
||||||
|
use futures::Stream;
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
struct UpdateArticle {
|
struct UpdateArticle {
|
||||||
|
|
|
@ -13,7 +13,7 @@ pub trait Resource {
|
||||||
fn allow(&self) -> Vec<hyper::Method>;
|
fn allow(&self) -> Vec<hyper::Method>;
|
||||||
fn head(&self) -> futures::BoxFuture<server::Response, Error>;
|
fn head(&self) -> futures::BoxFuture<server::Response, Error>;
|
||||||
fn get(self) -> futures::BoxFuture<server::Response, Error>;
|
fn get(self) -> futures::BoxFuture<server::Response, Error>;
|
||||||
fn put<S: 'static + futures::Stream<Item=hyper::Chunk, Error=hyper::Error> + Send + Sync>(self, body: S) -> futures::BoxFuture<server::Response, Error>;
|
fn put(self, body: hyper::Body) -> futures::BoxFuture<server::Response, Error>;
|
||||||
|
|
||||||
fn options(&self) -> Response {
|
fn options(&self) -> Response {
|
||||||
Response::new()
|
Response::new()
|
||||||
|
|
Loading…
Reference in a new issue