Skip to content

Commit

Permalink
rust: update to version 1.70.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill committed Jun 22, 2023
1 parent 59ba31f commit 573e666
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 18 deletions.
1 change: 1 addition & 0 deletions crates/sui-proc-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ pub fn sim_test(args: TokenStream, item: TokenStream) -> TokenStream {
let sig = &input.sig;
let body = &input.block;
quote! {
#[allow(clippy::needless_return)]
#[tokio::test]
#ignore
#sig {
Expand Down
7 changes: 3 additions & 4 deletions crates/sui-protocol-config-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ pub fn getters_macro(input: TokenStream) -> TokenStream {
_ => panic!("Only structs supported."),
};
let (getters, (value_lookup, field_names_str)): (Vec<_>, (Vec<_>, Vec<_>)) = tokens.unzip();
let inner_types1 = Vec::from_iter(seen_types);
let inner_types2: Vec<_> = inner_types1.clone();
let inner_types = Vec::from_iter(seen_types);
let output = quote! {
// For each getter, expand it out into a function in the impl block
impl #struct_name {
Expand Down Expand Up @@ -158,7 +157,7 @@ pub fn getters_macro(input: TokenStream) -> TokenStream {
#[allow(non_camel_case_types)]
#[derive(Clone, Serialize, Debug, PartialEq, Deserialize, schemars::JsonSchema)]
pub enum ProtocolConfigValue {
#(#inner_types1(#inner_types1),)*
#(#inner_types(#inner_types),)*
}

impl std::fmt::Display for ProtocolConfigValue {
Expand All @@ -167,7 +166,7 @@ pub fn getters_macro(input: TokenStream) -> TokenStream {
let mut writer = String::new();
match self {
#(
ProtocolConfigValue::#inner_types2(x) => {
ProtocolConfigValue::#inner_types(x) => {
write!(writer, "{}", x)?;
}
)*
Expand Down
6 changes: 1 addition & 5 deletions crates/sui-proxy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mod tests {
use protobuf::RepeatedField;
use std::net::TcpListener;
use std::time::Duration;
use sui_tls::{CertVerifier, TlsAcceptor, TlsConnectionInfo};
use sui_tls::{CertVerifier, TlsAcceptor};

async fn run_dummy_remote_write(listener: TcpListener) {
/// i accept everything, send me the trash
Expand Down Expand Up @@ -107,10 +107,6 @@ mod tests {
"dummy user agent",
);

// add handler to server
async fn handler(tls_info: axum::Extension<TlsConnectionInfo>) -> String {
tls_info.public_key().unwrap().to_string()
}
let app = admin::app(
Labels {
network: "unittest-network".into(),
Expand Down
6 changes: 2 additions & 4 deletions crates/sui-replay/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,8 @@ pub async fn execute_replay_command(
ReplayToolCommand::ReplayDump { path, show_effects } => {
let mut lx = LocalExec::new_for_state_dump(&path).await?;
let (sandbox_state, node_dump_state) = lx.execute_state_dump(safety).await?;
let effects = sandbox_state.local_exec_effects.clone();
if show_effects {
println!("{:#?}", effects)
println!("{:#?}", sandbox_state.local_exec_effects);
}

sandbox_state.check_effects()?;
Expand Down Expand Up @@ -167,9 +166,8 @@ pub async fn execute_replay_command(
)
.await?;

let effects = sandbox_state.local_exec_effects.clone();
if show_effects {
println!("{:#?}", effects)
println!("{:#?}", sandbox_state.local_exec_effects);
}

sandbox_state.check_effects()?;
Expand Down
2 changes: 1 addition & 1 deletion docker/sui-indexer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.68.2 AS chef
FROM rust:1.70.0 AS chef
WORKDIR sui
ARG GIT_REVISION
ENV GIT_REVISION=$GIT_REVISION
Expand Down
2 changes: 1 addition & 1 deletion docker/sui-node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.68.2 AS chef
FROM rust:1.70.0 AS chef
ARG PROFILE=release
WORKDIR sui
RUN apt-get update && apt-get install -y cmake clang
Expand Down
2 changes: 1 addition & 1 deletion docker/sui-tools/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.68.2 AS chef
FROM rust:1.70.0 AS chef
WORKDIR sui
ARG GIT_REVISION
ENV GIT_REVISION=$GIT_REVISION
Expand Down
2 changes: 1 addition & 1 deletion narwhal/Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG BUILD_MODE="release"
#################################################################
# Stage 0
#################################################################
FROM rust:1.68.2 AS chef
FROM rust:1.70.0 AS chef
WORKDIR "$WORKDIR/sui"
ARG BUILD_MODE

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.68.2"
channel = "1.70"
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,7 @@ fn vm_move_call(
Ok(result)
}

#[allow(clippy::extra_unused_type_parameters)]
fn deserialize_modules<Mode: ExecutionMode>(
context: &mut ExecutionContext<'_, '_, '_>,
module_bytes: &[Vec<u8>],
Expand Down

0 comments on commit 573e666

Please sign in to comment.