Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*): bump rust toolchain to 1.82 #4235

Merged
merged 2 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/iota-graphql-rpc-client/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ impl GraphqlResponse {
})
}

#[allow(clippy::result_large_err)]
pub fn graphql_version(&self) -> Result<String, ClientError> {
gokhan-simsek-iota marked this conversation as resolved.
Show resolved Hide resolved
Ok(self
.headers
Expand Down Expand Up @@ -90,6 +91,7 @@ impl GraphqlResponse {
self.full_response.errors.clone()
}

#[allow(clippy::result_large_err)]
pub fn usage(&self) -> Result<Option<BTreeMap<String, u64>>, ClientError> {
Ok(match self.full_response.extensions.get("usage").cloned() {
Some(Value::Object(obj)) => Some(
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-graphql-rpc-client/src/simple_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl SimpleClient {
}
}

#[allow(clippy::type_complexity)]
#[allow(clippy::type_complexity, clippy::result_large_err)]
pub fn resolve_variables(
vars: &[GraphqlQueryVariable],
) -> Result<(BTreeMap<String, String>, BTreeMap<String, Value>), ClientError> {
Expand Down
6 changes: 4 additions & 2 deletions crates/iota-replay/src/data_fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ impl DataFetcher for RemoteFetcher {
u64::from_str(&w["reference_gas_price"].to_string().replace('\"', "")).unwrap()
} else {
return Err(ReplayEngineError::UnexpectedEventFormat {
event: event.clone(),
event: Box::new(event.clone()),
});
};

Expand Down Expand Up @@ -639,7 +639,9 @@ pub fn extract_epoch_and_version(ev: IotaEvent) -> Result<(u64, u64), ReplayEngi
return Ok((epoch, version));
}

Err(ReplayEngineError::UnexpectedEventFormat { event: ev })
Err(ReplayEngineError::UnexpectedEventFormat {
event: Box::new(ev),
})
}

#[derive(Clone)]
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-replay/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ pub enum ReplayEngineError {
InvalidEpochChangeTx { epoch: u64 },

#[error("Unexpected event format {:#?}", event)]
UnexpectedEventFormat { event: IotaEvent },
UnexpectedEventFormat { event: Box<IotaEvent> },

#[error("Unable to find event for epoch {epoch}")]
EventNotFound { epoch: u64 },
Expand Down
4 changes: 2 additions & 2 deletions crates/iota-source-validation/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ pub enum Error {
module: Symbol,
},

#[error("Dependency ID contains a Iota object, not a Move package: {0}")]
ObjectFoundWhenPackageExpected(ObjectID, IotaRawMoveObject),
#[error("Dependency ID contains a Iota object, not a Move package: {}", .0.0)]
Thoralf-M marked this conversation as resolved.
Show resolved Hide resolved
ObjectFoundWhenPackageExpected(Box<(ObjectID, IotaRawMoveObject)>),

#[error("Could not deserialize on-chain dependency {address}::{module}.")]
OnChainDependencyDeserializationError {
Expand Down
6 changes: 3 additions & 3 deletions crates/iota-source-validation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ impl<'a> BytecodeSourceVerifier<'a> {

match obj {
IotaRawData::Package(pkg) => Ok(pkg),
IotaRawData::MoveObject(move_obj) => {
Err(Error::ObjectFoundWhenPackageExpected(obj_id, move_obj))
}
IotaRawData::MoveObject(move_obj) => Err(Error::ObjectFoundWhenPackageExpected(
Box::new((obj_id, move_obj)),
)),
}
}
}
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.81"
channel = "1.82"
2 changes: 1 addition & 1 deletion scripts/generate_files/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:20-bookworm

# Accept a build argument for the Rust version
ARG RUST_VERSION=1.81
ARG RUST_VERSION=1.82

# Get USER_ID from build-args
ARG USER_ID=1000
Expand Down
Loading