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

Bump minimum supported Rust version to 1.51.0 #68

Merged
merged 1 commit into from
Jan 29, 2022
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
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