From 3477864142ed09c36abea1111937b829fb41c8a4 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 10 Apr 2020 22:01:48 +0200 Subject: 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. --- src/version_table.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/version_table.rs') diff --git a/src/version_table.rs b/src/version_table.rs index 8c48d3af..28ee2e01 100644 --- a/src/version_table.rs +++ b/src/version_table.rs @@ -1,12 +1,11 @@ -use std::sync::Arc; -use serde::{Serialize, Deserialize}; use async_trait::async_trait; +use serde::{Deserialize, Serialize}; +use std::sync::Arc; use tokio::sync::RwLock; use crate::data::*; -use crate::table::*; use crate::server::Garage; - +use crate::table::*; #[derive(PartialEq, Clone, Debug, Serialize, Deserialize)] pub struct Version { -- cgit v1.2.3