Skip to content

Commit

Permalink
rust: bump serde_bytes to 0.11.5
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrus committed Sep 21, 2020
1 parent 7d8fe1c commit f998703
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 11 deletions.
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
oasis-core-runtime = { path = "../runtime" }
serde = { version = "1.0.116", features = ["derive"] }
serde_bytes = "~0.10"
serde_bytes = "0.11.5"
serde_cbor = "0.11.1"
anyhow = "1.0"
thiserror = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion client/src/enclave_rpc/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl Transport for GrpcTransport {
};

match self.grpc_client.call_enclave(&req, Default::default()) {
Ok(rsp) => Box::new(rsp.map(|r| r.into()).map_err(|error| error.into())),
Ok(rsp) => Box::new(rsp.map(|r| r.into_vec()).map_err(|error| error.into())),
Err(error) => Box::new(future::err(error.into())),
}
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/transaction/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl TxnClient {
Ok(resp) => Box::new(
resp.map(|r| {
drop(span);
r.into()
r.into_vec()
})
.map_err(|error| TxnClientError::CallFailed(format!("{}", error)).into()),
),
Expand Down
2 changes: 1 addition & 1 deletion keymanager-api-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ oasis-core-runtime = { path = "../runtime" }

base64 = "0.12.3"
serde = { version = "1.0.116", features = ["derive"] }
serde_bytes = "~0.10"
serde_bytes = "0.11.5"
rustc-hex = "2.0.1"
anyhow = "1.0"
thiserror = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ slog-stdlog = "4.0.0"
serde = { version = "1.0.116", features = ["derive"] }
serde_cbor = "0.11.1"
serde_json = "1.0.39"
serde_bytes = "~0.10"
serde_bytes = "0.11.5"
serde_repr = "0.1.5"
lazy_static = "1.3.0"
crossbeam = "0.7.1"
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/enclave_rpc/demux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl Demux {
let id = frame.session.clone();
let untrusted_plaintext = frame.untrusted_plaintext.clone();

if let Some(enriched_session) = self.sessions.get_mut(&id) {
if let Some(enriched_session) = self.sessions.get_mut(&id.into()) {
match enriched_session
.session
.process_data(frame.payload, writer)
Expand Down
1 change: 0 additions & 1 deletion runtime/src/enclave_rpc/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ impl SessionID {
/// Frame.
#[derive(Debug, Serialize, Deserialize)]
pub struct Frame {
#[serde(with = "serde_bytes")]
pub session: SessionID,
// The `untrusted_plaintext` field is only a temporary workaround until
// the snow library supports encrypting the payload with authenticated
Expand Down
3 changes: 2 additions & 1 deletion runtime/src/transaction/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ mod batch_serialize {
where
D: Deserializer<'de>,
{
Vec::<ByteBuf>::deserialize(deserializer).map(|v| v.into_iter().map(|e| e.into()).collect())
Vec::<ByteBuf>::deserialize(deserializer)
.map(|v| v.into_iter().map(ByteBuf::into_vec).collect())
}
}

Expand Down
1 change: 1 addition & 0 deletions tests/clients/simple-keyvalue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ grpcio = "0.4.6"
io-context = "0.2.0"
rand = "0.7.3"
tokio = "0.1.17"
serde_bytes = "0.11.5"
3 changes: 2 additions & 1 deletion tests/clients/simple-keyvalue/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use clap::{App, Arg};
use grpcio::EnvBuilder;
use io_context::Context;
use rand::{rngs::StdRng, Rng, SeedableRng};
use serde_bytes::ByteBuf;
use tokio::runtime::Runtime;

use oasis_core_client::{
Expand Down Expand Up @@ -229,7 +230,7 @@ fn main() {
round_max: latest_round,
conditions: vec![QueryCondition {
key: b"kv_op".to_vec(),
values: vec![b"insert".to_vec().into()],
values: vec![ByteBuf::from(b"insert".to_vec())],
}],
limit: 0,
};
Expand Down

0 comments on commit f998703

Please sign in to comment.