Skip to content

Commit 760e70c

Browse files
authored
Merge pull request #226 from AdExNetwork/update-dependencies
Update and clean up dependencies
2 parents 81a3b3d + c211912 commit 760e70c

File tree

8 files changed

+277
-278
lines changed

8 files changed

+277
-278
lines changed

Cargo.lock

Lines changed: 264 additions & 254 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

adapter/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ edition = "2018"
66

77
[dependencies]
88
primitives = {path = "../primitives"}
9-
# Futures
10-
futures-preview = {version = "=0.3.0-alpha.19"}
119
# Time handling
1210
chrono = "0.4"
1311
# To/From Hex

primitives/Cargo.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ edition = "2018"
88
postgres = ["postgres-types", "bytes", "tokio-postgres"]
99

1010
[dependencies]
11-
# Futures
12-
futures-preview = { version = "=0.3.0-alpha.19", features = ["compat"]}
1311
# (De)Serialization
1412
serde = { version = "^1.0", features = ['derive'] }
1513
serde_json = "1.0"
@@ -35,11 +33,11 @@ num-traits = "0.2"
3533
num-derive = "0.2"
3634
# Fixtures
3735
fake = { version = "^1.3", features = ["chrono"] }
38-
rand = { version = "^0.6" }
36+
rand = "^0.6"
3937
# postgres feature
40-
postgres-types = {version = "0.1.0-alpha.1", optional = true}
41-
bytes = { version = "0.4.12", optional = true}
42-
tokio-postgres = {version = "0.5.0-alpha.1", optional = true, features = ["with-chrono-0_4", "with-serde_json-1"]}
38+
postgres-types = { version = "0.1.0-alpha.2", optional = true }
39+
bytes = { version = "0.5", optional = true }
40+
tokio-postgres = { version = "0.5.0-alpha.2", optional = true, features = ["with-chrono-0_4", "with-serde_json-1"] }
4341

4442
# Other
4543
lazy_static = "1.4.0"

primitives/src/validator.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
use std::pin::Pin;
2-
31
use chrono::{DateTime, Utc};
4-
use futures::prelude::*;
52
use serde::{Deserialize, Serialize};
63
use serde_hex::{SerHex, StrictPfx};
74
use std::fmt;
@@ -17,8 +14,6 @@ pub enum ValidatorError {
1714
InvalidTransition,
1815
}
1916

20-
pub type ValidatorFuture<T> = Pin<Box<dyn Future<Output = Result<T, ValidatorError>> + Send>>;
21-
2217
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
2318
#[serde(transparent)]
2419
pub struct ValidatorId(#[serde(with = "SerHex::<StrictPfx>")] [u8; 20]);

sentry/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ edition = "2018"
66

77
[dependencies]
88
# Futures
9-
futures-preview = { version = "=0.3.0-alpha.19", features = ["compat"]}
9+
futures = "0.3.1"
1010
# Primitives
1111
primitives = { path = "../primitives", features = ["postgres"] }
1212
adapter = { version = "0.1", path = "../adapter" }
@@ -15,11 +15,11 @@ hex = "0.3.2"
1515
# CLI
1616
clap = "2.33.0"
1717
# Server
18-
tokio = "0.2.0-alpha.6"
19-
hyper = { version = "=0.13.0-alpha.4", features = ["unstable-stream"] }
18+
tokio = { version = "0.2", features = ["macros"] }
19+
hyper = { version = "0.13", features = ["stream"] }
2020
regex = "1"
2121
# Database
22-
redis = { version = "0.13.1-alpha.0", features = ["tokio-executor"] }
22+
redis = { version = "0.13.1-alpha.0", features = ["tokio-rt-core"] }
2323
bb8 = { git = "https://github.com/djc/bb8", branch = "async-await" }
2424
bb8-postgres = { git = "https://github.com/djc/bb8", branch = "async-await", features = ["with-chrono-0_4", "with-serde_json-1"] }
2525
# Migrations

sentry/src/routes/channel.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use crate::success_response;
44
use crate::Application;
55
use crate::ResponseError;
66
use crate::RouteParams;
7-
use futures::TryStreamExt;
87
use hex::FromHex;
98
use hyper::{Body, Request, Response};
109
use primitives::adapter::Adapter;
@@ -36,7 +35,7 @@ pub async fn create_channel<A: Adapter>(
3635
req: Request<Body>,
3736
app: &Application<A>,
3837
) -> Result<Response<Body>, ResponseError> {
39-
let body = req.into_body().try_concat().await?;
38+
let body = hyper::body::to_bytes(req.into_body()).await?;
4039

4140
let channel = serde_json::from_slice::<Channel>(&body)?;
4241

validator_worker/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ reqwest = "0.9.18"
2828
# Configuration
2929
lazy_static = "1.3"
3030
# (De)Serialization
31-
serde = { version = "^1.0", features = ['derive'] }
31+
serde = { version = "^1.0", features = ["derive"] }
3232
serde_json = "1.0"
3333
toml = "0.5"
3434
# CLI

validator_worker/src/main.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,15 @@ fn run<A: Adapter + 'static>(
121121
is_single_tick: bool,
122122
sentry_url: &str,
123123
config: &Config,
124-
adapter: A,
124+
mut adapter: A,
125125
) -> Result<(), Box<dyn Error>> {
126-
let mut sentry_adapter = adapter.clone();
127126
// unlock adapter
128-
sentry_adapter.unlock()?;
127+
adapter.unlock()?;
129128

130129
let args = Args {
131130
sentry_url: sentry_url.to_owned(),
132131
config: config.to_owned(),
133-
adapter: sentry_adapter,
132+
adapter,
134133
};
135134

136135
if is_single_tick {

0 commit comments

Comments
 (0)