From db4f18807d19b971bfe77a40c3833dd4e040d412 Mon Sep 17 00:00:00 2001 From: Magnus Hoff Date: Fri, 8 Sep 2017 14:46:18 +0200 Subject: [PATCH] Simplify by removing genericity. Nothing to be generic over --- src/site.rs | 3 ++- src/web/resource.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/site.rs b/src/site.rs index f5a1c8a..4960308 100644 --- a/src/site.rs +++ b/src/site.rs @@ -157,10 +157,11 @@ impl Resource for ArticleResource { ).boxed() } - fn put + Send + Sync>(self, body: S) -> futures::BoxFuture> { + fn put(self, body: hyper::Body) -> futures::BoxFuture> { // TODO Check incoming Content-Type use chrono::{TimeZone, Local}; + use futures::Stream; #[derive(Deserialize)] struct UpdateArticle { diff --git a/src/web/resource.rs b/src/web/resource.rs index 1f15b20..93e1a12 100644 --- a/src/web/resource.rs +++ b/src/web/resource.rs @@ -13,7 +13,7 @@ pub trait Resource { fn allow(&self) -> Vec; fn head(&self) -> futures::BoxFuture; fn get(self) -> futures::BoxFuture; - fn put + Send + Sync>(self, body: S) -> futures::BoxFuture; + fn put(self, body: hyper::Body) -> futures::BoxFuture; fn options(&self) -> Response { Response::new()