Skip to content

Commit 4080095

Browse files
authored
Merge pull request #1030 from openmina/chore/rust184
chore: Update minimum Rust toolchain to 1.84
2 parents 3933a11 + b09596a commit 4080095

File tree

97 files changed

+402
-441
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+402
-441
lines changed

.drone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ steps:
5353
- cp /usr/local/bin/mina cli/bin/
5454

5555
- name: build
56-
image: rust:1.83-bullseye
56+
image: rust:1.84-bullseye
5757
commands:
5858
- apt-get update && apt-get install -y libssl-dev libjemalloc-dev jq protobuf-compiler
59-
- rustup update 1.83 && rustup default 1.83
59+
- rustup update 1.84 && rustup default 1.84
6060
- rustup component add rustfmt
6161
# just to be sure it builds without errors
6262
- cargo build

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
132132
- name: Setup Rust
133133
run: |
134-
rustup default 1.83
134+
rustup default 1.84
135135
rustup component add rustfmt
136136
137137
- name: Setup Rust Cache
@@ -157,7 +157,7 @@ jobs:
157157
158158
- name: Setup Rust
159159
run: |
160-
rustup default 1.83
160+
rustup default 1.84
161161
rustup component add rustfmt
162162
163163
- name: Setup Rust Cache
@@ -217,7 +217,7 @@ jobs:
217217
218218
- name: Setup Rust
219219
run: |
220-
rustup default 1.83
220+
rustup default 1.84
221221
rustup component add rustfmt
222222
223223
- name: Setup Rust Cache
@@ -253,7 +253,7 @@ jobs:
253253
254254
- name: Setup Rust
255255
run: |
256-
rustup default 1.83
256+
rustup default 1.84
257257
rustup component add rustfmt
258258
259259
- name: Setup Rust Cache

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
sudo apt install -y protobuf-compiler
1818
- uses: actions-rs/toolchain@v1
1919
with:
20-
toolchain: 1.83
20+
toolchain: 1.84
2121
components: rustfmt, clippy
2222
default: true
2323
- uses: actions-rs/cargo@v1
@@ -36,4 +36,4 @@ jobs:
3636
name: clippy
3737
with:
3838
token: ${{ secrets.GITHUB_TOKEN }}
39-
args: --all-targets -- -D warnings --allow clippy::mutable_key_type --allow clippy::result_unit_err
39+
args: --all-targets -- -D warnings --allow clippy::mutable_key_type

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM rust:buster AS build
22
RUN apt-get update && apt-get install -y protobuf-compiler && apt-get clean
3-
RUN rustup default 1.83 && rustup component add rustfmt
3+
RUN rustup default 1.84 && rustup component add rustfmt
44
WORKDIR /openmina
55
COPY . .
66
RUN cargo build --release --package=cli --bin=openmina

cli/tests/bootstrap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ const READY: Duration = Duration::from_secs(20 * 60);
117117

118118
fn is_healthy() -> bool {
119119
reqwest::blocking::get(format!("http://localhost:{HTTP_PORT}/healthz"))
120-
.map_or(false, |res| res.status().is_success())
120+
.is_ok_and(|res| res.status().is_success())
121121
}
122122

123123
fn is_ready() -> bool {
124124
let ready = reqwest::blocking::get(format!("http://localhost:{HTTP_PORT}/readyz"))
125-
.map_or(false, |res| res.status().is_success());
125+
.is_ok_and(|res| res.status().is_success());
126126

127127
if let Err(err) = sync_stats() {
128128
println!("error getting stats: {err}");

core/src/block/block_with_hash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl<T: AsRef<Block>> BlockWithHash<T> {
118118
|| constraint_constants()
119119
.fork
120120
.as_ref()
121-
.map_or(false, |fork| fork.blockchain_length + 1 == self.height())
121+
.is_some_and(|fork| fork.blockchain_length + 1 == self.height())
122122
}
123123

124124
pub fn root_block_height(&self) -> u32 {

core/src/distributed_pool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ where
3737
pub fn contains(&self, key: &Key) -> bool {
3838
self.by_key
3939
.get(key)
40-
.map_or(false, |i| self.list.contains_key(i))
40+
.is_some_and(|i| self.list.contains_key(i))
4141
}
4242

4343
pub fn get(&self, key: &Key) -> Option<&State> {

docker/producer-dashboard/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.83 AS app-builder
1+
FROM rust:1.84 AS app-builder
22

33
WORKDIR /usr/src/openmina-producer-dashboard
44

docs/building-from-source-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Open up the command line and enter the following:
3939
And then:
4040

4141
```sh
42-
# Install rustup and set the default Rust toolchain to 1.80 (newer versions work too)
43-
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.80
42+
# Install rustup and set the default Rust toolchain to 1.84 (newer versions work too)
43+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.84
4444
# Setup the current shell with rustup
4545
source "$HOME/.cargo/env"
4646
# Clone the openmina repository

ledger/src/transaction_pool.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,6 +1257,7 @@ impl IndexedPool {
12571257
};
12581258

12591259
// TODO: Should `self.all_by_fee` be a `BTreeSet` instead ?
1260+
#[allow(clippy::mutable_key_type)]
12601261
let bset: BTreeSet<_> = set.iter().collect();
12611262
// TODO: Not sure if OCaml compare the same way than we do
12621263
let min = bset.first().map(|min| (*min).clone()).unwrap();
@@ -1755,9 +1756,12 @@ impl TransactionPool {
17551756
let mut new_commands = collect_hashed(new_commands);
17561757
let mut removed_commands = collect_hashed(removed_commands);
17571758

1759+
#[allow(clippy::mutable_key_type)]
17581760
let new_commands_set = new_commands.iter().collect::<HashSet<_>>();
1761+
#[allow(clippy::mutable_key_type)]
17591762
let removed_commands_set = removed_commands.iter().collect::<HashSet<_>>();
17601763

1764+
#[allow(clippy::mutable_key_type)]
17611765
let duplicates = new_commands_set
17621766
.intersection(&removed_commands_set)
17631767
.map(|cmd| (*cmd).clone())

0 commit comments

Comments
 (0)