Skip to content

Commit

Permalink
Bump minimum supported Rust version to 1.51.0
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Jan 29, 2022
1 parent 27388da commit 297ccdd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand 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:
Expand All @@ -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
Expand All @@ -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" }}
7 changes: 5 additions & 2 deletions rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
`cargo clippy -- --test -W clippy::pedantic`

## MSRV

The minimum supported Rust version (MSRV) is 1.51.0.
12 changes: 6 additions & 6 deletions rust/src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ mod tests {
suffix: vec![],
hash: inner_spec.hash,
},
spec: spec,
spec,
is_left: true,
is_right: false,
},
Expand All @@ -648,7 +648,7 @@ mod tests {
suffix: empty_child.clone(),
hash: inner_spec.hash,
},
spec: spec,
spec,
is_left: false,
is_right: true,
},
Expand All @@ -659,7 +659,7 @@ mod tests {
suffix: vec![],
hash: inner_spec.hash,
},
spec: spec,
spec,
is_left: false,
is_right: false,
},
Expand All @@ -669,7 +669,7 @@ mod tests {
suffix: vec![0u8; 32],
hash: inner_spec.hash,
},
spec: spec,
spec,
is_left: false,
is_right: false,
},
Expand All @@ -679,7 +679,7 @@ mod tests {
suffix: vec![],
hash: inner_spec.hash,
},
spec: spec,
spec,
is_left: false,
is_right: false,
},
Expand All @@ -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,
},
Expand Down

0 comments on commit 297ccdd

Please sign in to comment.