aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-10 22:01:48 +0200
committerAlex Auvolat <alex@adnab.me>2020-04-10 22:01:48 +0200
commit3477864142ed09c36abea1111937b829fb41c8a4 (patch)
treed95221e66b9c014af7f4dba61ae4ff113c0e409a /src/error.rs
parentd66c0d6833ddbeb61e34ee222dde92a5363bda1f (diff)
downloadgarage-3477864142ed09c36abea1111937b829fb41c8a4.tar.gz
garage-3477864142ed09c36abea1111937b829fb41c8a4.zip
Fix the Sync issue. Details:
So the HTTP client future of Hyper is not Sync, thus the stream that read blocks wasn't either. However Hyper's default Body type requires a stream to be Sync for wrap_stream. Solution: reimplement a custom HTTP body type.
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/error.rs b/src/error.rs
index 8b2fc419..5eb5a960 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -1,6 +1,6 @@
-use std::io;
use err_derive::Error;
use hyper::StatusCode;
+use std::io;
#[derive(Debug, Error)]
pub enum Error {
@@ -13,8 +13,8 @@ pub enum Error {
#[error(display = "HTTP error: {}", _0)]
HTTP(#[error(source)] http::Error),
- #[error(display = "Invalid HTTP header value: {}", _0)]
- HTTPHeader(#[error(source)] http::header::ToStrError),
+ #[error(display = "Invalid HTTP header value: {}", _0)]
+ HTTPHeader(#[error(source)] http::header::ToStrError),
#[error(display = "Sled error: {}", _0)]
Sled(#[error(source)] sled::Error),