diff --git a/.circleci/config.yml b/.circleci/config.yml index 35739b808..e8e94d500 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,7 +51,7 @@ jobs: - "/go/pkg/mod" rust: docker: - - image: rust:1.42 + - image: rust:1.51.0 working_directory: ~/proofs/rust steps: - checkout: @@ -61,7 +61,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} + - v4-cargo-cache-rust:1.51.0-{{ arch }}-{{ checksum "Cargo.lock" }} - run: name: Check all targets in std command: cargo check --all @@ -86,14 +86,14 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} + key: v4-cargo-cache-rust:1.51.0-{{ arch }}-{{ checksum "Cargo.lock" }} - run: name: Run all tests command: cargo test --all lint-rust: docker: - - image: rust:1.42 + - image: rust:1.51.0 working_directory: ~/proofs/rust steps: - checkout: @@ -103,7 +103,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-lint-rust:1.42.0-{{ checksum "Cargo.lock" }} + - cargocache-v2-lint-rust:1.51.0-{{ checksum "Cargo.lock" }} - run: name: Add rustfmt component command: rustup component add rustfmt @@ -125,4 +125,4 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-lint-rust:1.42.0-{{ checksum "Cargo.lock" }} + key: cargocache-v2-lint-rust:1.51.0-{{ checksum "Cargo.lock" }} diff --git a/rust/README.md b/rust/README.md index 64585e317..74469a58d 100644 --- a/rust/README.md +++ b/rust/README.md @@ -14,11 +14,14 @@ Unless you modify the protobuf file, you can ignore this step. `cargo fmt` - ## Testing `cargo test` ## Linting -`cargo clippy -- --test -W clippy::pedantic` \ No newline at end of file +`cargo clippy -- --test -W clippy::pedantic` + +## MSRV + +The minimum supported Rust version (MSRV) is 1.51.0. diff --git a/rust/src/verify.rs b/rust/src/verify.rs index 0d8074a1f..b9231b319 100644 --- a/rust/src/verify.rs +++ b/rust/src/verify.rs @@ -638,7 +638,7 @@ mod tests { suffix: vec![], hash: inner_spec.hash, }, - spec: spec, + spec, is_left: true, is_right: false, }, @@ -648,7 +648,7 @@ mod tests { suffix: empty_child.clone(), hash: inner_spec.hash, }, - spec: spec, + spec, is_left: false, is_right: true, }, @@ -659,7 +659,7 @@ mod tests { suffix: vec![], hash: inner_spec.hash, }, - spec: spec, + spec, is_left: false, is_right: false, }, @@ -669,7 +669,7 @@ mod tests { suffix: vec![0u8; 32], hash: inner_spec.hash, }, - spec: spec, + spec, is_left: false, is_right: false, }, @@ -679,7 +679,7 @@ mod tests { suffix: vec![], hash: inner_spec.hash, }, - spec: spec, + spec, is_left: false, is_right: false, }, @@ -689,7 +689,7 @@ mod tests { suffix: [&empty_child[..28], b"xxxx"].concat().to_vec(), hash: inner_spec.hash, }, - spec: spec, + spec, is_left: false, is_right: false, },