Update dependencies (#18)
* update dependencies * tonic-examples: Lock -> Mutex
This commit is contained in:
committed by
Lucio Franco
parent
02d14da3d6
commit
d275785c55
@@ -4,8 +4,6 @@ version = "0.1.0"
|
|||||||
authors = ["Lucio Franco <[email protected]>"]
|
authors = ["Lucio Franco <[email protected]>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
prost-build = "0.5"
|
prost-build = "0.5"
|
||||||
syn = "1.0"
|
syn = "1.0"
|
||||||
|
|||||||
@@ -50,11 +50,11 @@ bytes = "0.4"
|
|||||||
prost = "0.5"
|
prost = "0.5"
|
||||||
prost-derive = "0.5"
|
prost-derive = "0.5"
|
||||||
|
|
||||||
tokio = "=0.2.0-alpha.4"
|
tokio = "=0.2.0-alpha.6"
|
||||||
futures-preview = { version = "=0.3.0-alpha.18", default-features = false, features = ["alloc"]}
|
futures-preview = { version = "=0.3.0-alpha.19", default-features = false, features = ["alloc"]}
|
||||||
async-stream = "0.1.1"
|
async-stream = "0.1.2"
|
||||||
http = "0.1"
|
http = "0.1"
|
||||||
tower = "0.3.0-alpha.1a"
|
tower = "0.3.0-alpha.2"
|
||||||
|
|
||||||
# Required for routeguide
|
# Required for routeguide
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use std::hash::{Hash, Hasher};
|
|||||||
use std::pin::Pin;
|
use std::pin::Pin;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
use tokio::sync::{mpsc, Lock};
|
use tokio::sync::{mpsc, Mutex};
|
||||||
use tonic::transport::Server;
|
use tonic::transport::Server;
|
||||||
use tonic::{Request, Response, Status};
|
use tonic::{Request, Response, Status};
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ pub struct RouteGuide {
|
|||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
struct State {
|
struct State {
|
||||||
features: Arc<Vec<Feature>>,
|
features: Arc<Vec<Feature>>,
|
||||||
notes: Lock<HashMap<Point, Vec<RouteNote>>>,
|
notes: Arc<Mutex<HashMap<Point, Vec<RouteNote>>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tonic::async_trait]
|
#[tonic::async_trait]
|
||||||
@@ -161,7 +161,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
state: State {
|
state: State {
|
||||||
// Load data file
|
// Load data file
|
||||||
features: Arc::new(data::load()),
|
features: Arc::new(data::load()),
|
||||||
notes: Lock::new(HashMap::new()),
|
notes: Arc::new(Mutex::new(HashMap::new())),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -13,17 +13,17 @@ name = "server"
|
|||||||
path = "src/bin/server.rs"
|
path = "src/bin/server.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tokio = "=0.2.0-alpha.4"
|
tokio = "=0.2.0-alpha.6"
|
||||||
tonic = { path = "../tonic", features = ["openssl"] }
|
tonic = { path = "../tonic", features = ["openssl"] }
|
||||||
prost = "0.5"
|
prost = "0.5"
|
||||||
prost-derive = "0.5"
|
prost-derive = "0.5"
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
http = "0.1"
|
http = "0.1"
|
||||||
futures-core-preview = "=0.3.0-alpha.18"
|
futures-core-preview = "=0.3.0-alpha.19"
|
||||||
futures-util-preview = "=0.3.0-alpha.18"
|
futures-util-preview = "=0.3.0-alpha.19"
|
||||||
async-stream = "0.1.1"
|
async-stream = "0.1.2"
|
||||||
tower = "0.3.0-alpha.1a"
|
tower = "0.3.0-alpha.2"
|
||||||
http-body = "0.2.0-alpha.1"
|
http-body = "0.2.0-alpha.2"
|
||||||
|
|
||||||
console = "0.7"
|
console = "0.7"
|
||||||
structopt = "0.2"
|
structopt = "0.2"
|
||||||
|
|||||||
+16
-16
@@ -39,18 +39,18 @@ tls = []
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
futures-core-preview = "=0.3.0-alpha.18"
|
futures-core-preview = "=0.3.0-alpha.19"
|
||||||
futures-util-preview = "=0.3.0-alpha.18"
|
futures-util-preview = "=0.3.0-alpha.19"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
http = "0.1.14"
|
http = "0.1.14"
|
||||||
base64 = "0.10"
|
base64 = "0.10"
|
||||||
|
|
||||||
percent-encoding = "1.0.1"
|
percent-encoding = "1.0.1"
|
||||||
tower-service = "=0.3.0-alpha.1"
|
tower-service = "=0.3.0-alpha.2"
|
||||||
tokio-codec = "=0.2.0-alpha.4"
|
tokio-codec = "=0.2.0-alpha.6"
|
||||||
async-stream = "0.1.1"
|
async-stream = "0.1.2"
|
||||||
http-body = "0.2.0-alpha.1"
|
http-body = "0.2.0-alpha.3"
|
||||||
pin-project = "=0.4.0-alpha.11"
|
pin-project = "^0.4"
|
||||||
|
|
||||||
# prost
|
# prost
|
||||||
prost = { version = "0.5", optional = true }
|
prost = { version = "0.5", optional = true }
|
||||||
@@ -60,17 +60,17 @@ prost-derive = { version = "0.5", optional = true }
|
|||||||
async-trait = { version = "0.1.13", optional = true }
|
async-trait = { version = "0.1.13", optional = true }
|
||||||
|
|
||||||
# transport
|
# transport
|
||||||
hyper = { git = "https://github.com/hyperium/hyper", features = ["unstable-stream"], optional = true, rev = "2b0405c48c10bca7893c30ea960ac20a41a8578f" }
|
hyper = { version = "0.13.0-alpha.3", features = ["unstable-stream"], optional = true }
|
||||||
tokio = { version = "=0.2.0-alpha.4", default-features = false, features = ["tcp"], optional = true }
|
tokio = { version = "=0.2.0-alpha.6", default-features = false, features = ["tcp"], optional = true }
|
||||||
tower = { version = "=0.3.0-alpha.1a", optional = true}
|
tower = { version = "=0.3.0-alpha.2", optional = true}
|
||||||
tower-make = "=0.1.0-alpha.2"
|
tower-make = "=0.3.0-alpha.2a"
|
||||||
tower-reconnect = { version = "=0.3.0-alpha.1", optional = true }
|
tower-reconnect = { version = "=0.3.0-alpha.2", optional = true }
|
||||||
tower-balance = { version = "=0.3.0-alpha.1", optional = true }
|
tower-balance = { version = "=0.3.0-alpha.2", optional = true }
|
||||||
tower-load = { version = "=0.3.0-alpha.1", optional = true }
|
tower-load = { version = "=0.3.0-alpha.2", optional = true }
|
||||||
|
|
||||||
# openssl
|
# openssl
|
||||||
tokio-openssl = { version = "=0.4.0-alpha.4", optional = true }
|
tokio-openssl = { version = "=0.4.0-alpha.6", optional = true }
|
||||||
openssl1 = { package = "openssl", version = "0.10", optional = true }
|
openssl1 = { package = "openssl", version = "0.10", optional = true }
|
||||||
|
|
||||||
# rustls
|
# rustls
|
||||||
tokio-rustls = { version = "0.12.0-alpha.2", optional = true }
|
tokio-rustls = { version = "0.12.0-alpha.4", optional = true }
|
||||||
|
|||||||
Reference in New Issue
Block a user