Skip to content

Commit c9a1693

Browse files
authored
Update to Rust 1.71 (smol-dot#922)
* Update to Rust 1.71 * Use "limited", actually * Fix new warnings * Update the fuzzing toolchain
1 parent 3c3722a commit c9a1693

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
test-64bits:
3131
runs-on: ubuntu-latest
3232
container:
33-
image: rust:1.70
33+
image: rust:1.71
3434
steps:
3535
- uses: actions/checkout@v3
3636
- uses: Swatinem/rust-cache@v2
@@ -39,7 +39,7 @@ jobs:
3939
test-32bits:
4040
runs-on: ubuntu-latest
4141
container:
42-
image: rust:1.70
42+
image: rust:1.71
4343
steps:
4444
- run: apt-get update && apt install -y libc6-dev-i386
4545
- uses: actions/checkout@v3
@@ -50,7 +50,7 @@ jobs:
5050
wasm-node-check:
5151
runs-on: ubuntu-latest
5252
container:
53-
image: rust:1.70
53+
image: rust:1.71
5454
steps:
5555
- uses: actions/checkout@v3
5656
- uses: Swatinem/rust-cache@v2
@@ -65,7 +65,7 @@ jobs:
6565
check-features:
6666
runs-on: ubuntu-latest
6767
container:
68-
image: rust:1.70
68+
image: rust:1.71
6969
steps:
7070
- uses: actions/checkout@v3
7171
- uses: Swatinem/rust-cache@v2
@@ -105,7 +105,7 @@ jobs:
105105
# Since build artifacts are specific to a nightly version, we pin the specific nightly
106106
# version to use in order to not invalidate the build cache every day. The exact version
107107
# is completely arbitrary.
108-
toolchain: nightly-2023-04-20
108+
toolchain: nightly-2023-07-15
109109
override: true
110110
- uses: baptiste0928/cargo-install@v2 # This action ensures that the compilation is cached.
111111
with:
@@ -119,7 +119,7 @@ jobs:
119119
check-rustdoc-links:
120120
runs-on: ubuntu-latest
121121
container:
122-
image: rust:1.70
122+
image: rust:1.71
123123
steps:
124124
- uses: actions/checkout@v3
125125
- uses: Swatinem/rust-cache@v2

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
build-js-doc:
5757
runs-on: ubuntu-latest
5858
container:
59-
image: rust:1.70
59+
image: rust:1.71
6060
steps:
6161
- uses: actions/checkout@v3
6262
with:
@@ -82,7 +82,7 @@ jobs:
8282
build-rust-doc:
8383
runs-on: ubuntu-latest
8484
container:
85-
image: rust:1.70
85+
image: rust:1.71
8686
steps:
8787
- uses: actions/checkout@v3
8888
with:
@@ -103,7 +103,7 @@ jobs:
103103
build-tests-coverage:
104104
runs-on: ubuntu-latest
105105
container:
106-
image: rust:1.70
106+
image: rust:1.71
107107
steps:
108108
- run: apt update && apt install -y jq
109109
- run: rustup component add llvm-tools-preview
@@ -173,7 +173,7 @@ jobs:
173173
npm-publish:
174174
runs-on: ubuntu-latest
175175
container:
176-
image: rust:1.70
176+
image: rust:1.71
177177
steps:
178178
- uses: actions/checkout@v3
179179
- uses: actions/[email protected]

.github/workflows/periodic-cargo-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
cargo-update:
1010
runs-on: ubuntu-latest
1111
container:
12-
image: rust:1.70
12+
image: rust:1.71
1313
steps:
1414
- uses: actions/checkout@v3
1515
# Note: `cargo update --workspace` doesn't seem to have any effect.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repository = "https://github.com/smol-dot/smoldot"
1616
include = ["**/*.rs"] # Only Rust files are included, as anything else might be a test fixture.
1717

1818
[profile.dev]
19-
debug = 1 # Default value is `2`, which contains the full debug info. `1` is enough for stack traces. # TODO: use the named version after Cargo v1.71
19+
debug = "limited"
2020
opt-level = 2
2121
panic = "abort"
2222
[profile.dev.package."*"]

light-base/src/runtime_service.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ impl<TPlat: PlatformRef> RuntimeService<TPlat> {
227227
}
228228
}
229229
};
230-
let mut guarded_lock = &mut *guarded_lock;
230+
let guarded_lock = &mut *guarded_lock;
231231

232232
// Extract the components of the `FinalizedBlockRuntimeKnown`. We are guaranteed by the
233233
// block above to be in this state.
@@ -1413,7 +1413,7 @@ async fn run_background<TPlat: PlatformRef>(
14131413
let near_head_of_chain = background.sync_service.is_near_head_of_chain_heuristic().await;
14141414

14151415
let mut guarded = background.guarded.lock().await;
1416-
let mut guarded = &mut *guarded;
1416+
let guarded = &mut *guarded;
14171417
// TODO: note that this code is never reached for parachains
14181418
if new_block.is_new_best {
14191419
guarded.best_near_head_of_chain = near_head_of_chain;
@@ -1466,7 +1466,7 @@ async fn run_background<TPlat: PlatformRef>(
14661466
let near_head_of_chain = background.sync_service.is_near_head_of_chain_heuristic().await;
14671467

14681468
let mut guarded = background.guarded.lock().await;
1469-
let mut guarded = &mut *guarded;
1469+
let guarded = &mut *guarded;
14701470
guarded.best_near_head_of_chain = near_head_of_chain;
14711471

14721472
match &mut guarded.tree {

light-base/src/sync_service/parachain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ impl<TPlat: PlatformRef> ParachainBackgroundTask<TPlat> {
675675

676676
/// Start fetching parachain headers of new blocks whose parachain block needs to be fetched.
677677
fn start_paraheads_fetch(&mut self) {
678-
let mut runtime_subscription = match &mut self.subscription_state {
678+
let runtime_subscription = match &mut self.subscription_state {
679679
ParachainBackgroundState::NotSubscribed { .. } => return,
680680
ParachainBackgroundState::Subscribed(s) => s,
681681
};

light-base/src/transactions_service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ async fn background_task<TPlat: PlatformRef>(mut config: BackgroundTaskConfig<TP
673673
// A block body download has finished, successfully or not.
674674
let (block_hash, block_body) = download;
675675

676-
let mut block = match worker.pending_transactions.block_user_data_mut(&block_hash) {
676+
let block = match worker.pending_transactions.block_user_data_mut(&block_hash) {
677677
Some(b) => b,
678678
None => {
679679
// It is possible that this block has been discarded because a sibling

wasm-node/javascript/prepare.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if (buildProfile != 'debug' && buildProfile != 'min-size-release')
3838
// The Rust version is pinned because the wasi target is still unstable. Without pinning, it is
3939
// possible for the wasm-js bindings to change between two Rust versions. Feel free to update
4040
// this version pin whenever you like, provided it continues to build.
41-
const rustVersion = '1.70.0';
41+
const rustVersion = '1.71.0';
4242

4343
// Assume that the user has `rustup` installed and make sure that `rust_version` is available.
4444
// Because `rustup install` requires an Internet connection, check whether the toolchain is

0 commit comments

Comments
 (0)