diff options
author | Martin Fischer <martin@push-f.com> | 2021-04-09 12:32:01 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-04-09 12:49:02 +0200 |
commit | 9df4a6c0b55b2e680eca4e89489ad4c684bfb127 (patch) | |
tree | 9d95f03bd52509bb29b76ad9ed21f3d796272619 /src/response.rs | |
parent | bfeddf5d15ddaa9937ceeba04678ad6c4a4e8aea (diff) |
make hyper dependency optional
Diffstat (limited to 'src/response.rs')
-rw-r--r-- | src/response.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/response.rs b/src/response.rs index 2d5d469..cb87a80 100644 --- a/src/response.rs +++ b/src/response.rs @@ -3,9 +3,9 @@ use std::convert::TryInto; use cookie::Cookie; -use hyper::{HeaderMap, StatusCode, header, http}; use time::{Duration, OffsetDateTime}; -use hyper::http::response::Builder; + +use crate::http::{self, HeaderMap, StatusCode, header, response::Builder}; /// Adds convenience methods to [`Builder`]. pub trait SputnikBuilder { @@ -66,12 +66,6 @@ pub trait EmptyBuilder<B> { fn empty(self) -> http::Result<http::response::Response<B>>; } -impl EmptyBuilder<hyper::Body> for Builder { - fn empty(self) -> http::Result<http::response::Response<hyper::Body>> { - self.body(hyper::Body::empty()) - } -} - #[cfg(test)] mod tests { use super::*; |