Skip to content

Commit

Permalink
Upgrade to Rust 1.79.0 (#2132)
Browse files Browse the repository at this point in the history
  • Loading branch information
afck authored Jun 17, 2024
1 parent cb9062c commit 6e990f3
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
5 changes: 1 addition & 4 deletions linera-base/src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,7 @@ where

impl CryptoHash {
/// Computes a hash.
pub fn new<T: ?Sized>(value: &T) -> Self
where
T: BcsHashable,
{
pub fn new<T: ?Sized + BcsHashable>(value: &T) -> Self {
use sha3::digest::Digest;

let mut hasher = sha3::Sha3_256::default();
Expand Down
2 changes: 1 addition & 1 deletion linera-core/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ pub enum ChainClientError {

impl From<Infallible> for ChainClientError {
fn from(infallible: Infallible) -> Self {
infallible.into()
match infallible {}
}
}

Expand Down
6 changes: 3 additions & 3 deletions linera-indexer/plugins/src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ where
let mut result = Vec::new();
let limit = limit.unwrap_or(20);
for _ in 0..limit {
let Some(next_key) = key else { break };
let operation = plugin.operations.get(&next_key).await?;
let Some(next_key) = &key else { break };
let operation = plugin.operations.get(next_key).await?;
match operation {
None => break,
Some(op) => {
key = op.previous_operation.clone();
key.clone_from(&op.previous_operation);
result.push(op)
}
}
Expand Down
2 changes: 1 addition & 1 deletion linera-service/tests/end_to_end_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ async fn test_wasm_end_to_end_crowd_funding(config: impl LineraNetConfig) -> Res
.await?;

// Setting up the application crowd funding
let deadline = Timestamp::from(std::u64::MAX);
let deadline = Timestamp::from(u64::MAX);
let target = Amount::ONE;
let state_crowd = InstantiationArgument {
owner: account_owner1,
Expand Down
4 changes: 2 additions & 2 deletions linera-views/tests/queueview_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async fn queue_view_mutability_check() {
if choice == 4 {
// Doing the rollback
view.rollback();
new_vector = vector.clone();
new_vector.clone_from(&vector);
}
let new_elements = view.queue.elements().await.unwrap();
let new_hash = view.crypto_hash().await.unwrap();
Expand All @@ -86,7 +86,7 @@ async fn queue_view_mutability_check() {
assert_eq!(new_elements, new_vector);
}
if save {
vector = new_vector.clone();
vector.clone_from(&new_vector);
view.save().await.unwrap();
}
}
Expand Down
2 changes: 1 addition & 1 deletion toolchains/build/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.77.2"
channel = "1.79.0"
components = [ "clippy", "rustfmt", "rust-src" ]
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal"

0 comments on commit 6e990f3

Please sign in to comment.