Skip to content

Commit 1a6a78a

Browse files
committed
Merge #1776: ci: automated update to rustc 1.83.0
272ce22 ci: update build_docs job to use rust nightly (Steve Myers) 1755480 ci: use prepared rust-version instead of stable for all jobs (Steve Myers) 173cc42 ci(clippy): fix updated ptr_arg check for rust 1.83 (Steve Myers) 1d03db9 ci(clippy): fix new default warn empty_line_after_doc_comments for rust 1.83 (Steve Myers) 941bca0 ci(clippy): fix new stricter needless_lifetime errors for rust 1.83 (Steve Myers) 2586e1e ci: automated update to rustc 1.83.0 (Github Action) Pull request description: Automated update to Github CI workflow `cont_integration.yml` by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action I manually fixed new clippy warnings. I also changed CI to: ~~1. not build or run tests or test dependencies when building with MSRV. This reduced the number of dependencies we need to pin for MSRV and fixes 1398.~~ I removed these changes. 2. use the same version or rust as in the `rust-version` file for all jobs instead of just for clippy. I made this change to prevent CI breaks when stable changes before we have a chance to fix the auto created PR that bumps the `rust-version` file. ACKs for top commit: oleonardolima: tACK 272ce22 nymius: tACK 272ce22 ValuedMammal: ACK 272ce22 Tree-SHA512: de3e9447e25f82474cd6902ade9dfad4145686b4084296d3fd2065e28bf811579bbaa18225d175372e7dd9914377c6e8260998ff991b0f482f19551884bbf9ca
2 parents dbc6a1e + 272ce22 commit 1a6a78a

File tree

16 files changed

+32
-31
lines changed

16 files changed

+32
-31
lines changed

.github/workflows/cont_integration.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ jobs:
1616
run: echo "rust_version=$(cat rust-version)" >> $GITHUB_OUTPUT
1717

1818
build-test:
19+
needs: prepare
1920
name: Build and test
2021
runs-on: ubuntu-latest
2122
strategy:
2223
matrix:
2324
rust:
24-
- version: stable
25+
- version: ${{ needs.prepare.outputs.rust_version }}
2526
clippy: true
2627
- version: 1.63.0 # MSRV
2728
features:
@@ -60,6 +61,7 @@ jobs:
6061
run: cargo test --workspace --exclude 'example_*' ${{ matrix.features }}
6162

6263
check-no-std:
64+
needs: prepare
6365
name: Check no_std
6466
runs-on: ubuntu-latest
6567
steps:
@@ -68,7 +70,7 @@ jobs:
6870
- name: Install Rust toolchain
6971
uses: actions-rs/toolchain@v1
7072
with:
71-
toolchain: stable
73+
toolchain: ${{ needs.prepare.outputs.rust_version }}
7274
override: true
7375
profile: minimal
7476
# target: "thumbv6m-none-eabi"
@@ -88,6 +90,7 @@ jobs:
8890
run: cargo check --no-default-features --features miniscript/no-std,bdk_chain/hashbrown
8991

9092
check-wasm:
93+
needs: prepare
9194
name: Check WASM
9295
runs-on: ubuntu-20.04
9396
env:
@@ -103,7 +106,7 @@ jobs:
103106
- name: Install Rust toolchain
104107
uses: actions-rs/toolchain@v1
105108
with:
106-
toolchain: stable
109+
toolchain: ${{ needs.prepare.outputs.rust_version }}
107110
override: true
108111
profile: minimal
109112
target: "wasm32-unknown-unknown"
@@ -117,6 +120,7 @@ jobs:
117120
run: cargo check --target wasm32-unknown-unknown --no-default-features --features miniscript/no-std,bdk_chain/hashbrown,async
118121

119122
fmt:
123+
needs: prepare
120124
name: Rust fmt
121125
runs-on: ubuntu-latest
122126
steps:
@@ -125,7 +129,7 @@ jobs:
125129
- name: Install Rust toolchain
126130
uses: actions-rs/toolchain@v1
127131
with:
128-
toolchain: stable
132+
toolchain: ${{ needs.prepare.outputs.rust_version }}
129133
override: true
130134
profile: minimal
131135
components: rustfmt
@@ -153,6 +157,7 @@ jobs:
153157
args: --all-features --all-targets -- -D warnings
154158

155159
build-examples:
160+
needs: prepare
156161
name: Build & Test Examples
157162
runs-on: ubuntu-latest
158163
strategy:
@@ -172,7 +177,7 @@ jobs:
172177
- name: Install Rust toolchain
173178
uses: actions-rs/toolchain@v1
174179
with:
175-
toolchain: stable
180+
toolchain: ${{ needs.prepare.outputs.rust_version }}
176181
override: true
177182
profile: minimal
178183
- name: Rust Cache

.github/workflows/nightly_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Checkout sources
1111
uses: actions/checkout@v4
1212
- name: Set default toolchain
13-
run: rustup default nightly-2024-05-12
13+
run: rustup default nightly
1414
- name: Set profile
1515
run: rustup set profile minimal
1616
- name: Update toolchain

crates/chain/src/tx_data_traits.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub trait Anchor: core::fmt::Debug + Clone + Eq + PartialOrd + Ord + core::hash:
7676
}
7777
}
7878

79-
impl<'a, A: Anchor> Anchor for &'a A {
79+
impl<A: Anchor> Anchor for &A {
8080
fn anchor_block(&self) -> BlockId {
8181
<A as Anchor>::anchor_block(self)
8282
}
@@ -112,13 +112,13 @@ pub struct TxPosInBlock<'b> {
112112
pub tx_pos: usize,
113113
}
114114

115-
impl<'b> From<TxPosInBlock<'b>> for BlockId {
115+
impl From<TxPosInBlock<'_>> for BlockId {
116116
fn from(pos: TxPosInBlock) -> Self {
117117
pos.block_id
118118
}
119119
}
120120

121-
impl<'b> From<TxPosInBlock<'b>> for ConfirmationBlockTime {
121+
impl From<TxPosInBlock<'_>> for ConfirmationBlockTime {
122122
fn from(pos: TxPosInBlock) -> Self {
123123
Self {
124124
block_id: pos.block_id,

crates/chain/src/tx_graph.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ pub struct TxNode<'a, T, A> {
183183
pub last_seen_unconfirmed: Option<u64>,
184184
}
185185

186-
impl<'a, T, A> Deref for TxNode<'a, T, A> {
186+
impl<T, A> Deref for TxNode<'_, T, A> {
187187
type Target = T;
188188

189189
fn deref(&self) -> &Self::Target {
@@ -1350,7 +1350,7 @@ where
13501350
}
13511351
}
13521352

1353-
impl<'g, A, F, O> Iterator for TxAncestors<'g, A, F, O>
1353+
impl<A, F, O> Iterator for TxAncestors<'_, A, F, O>
13541354
where
13551355
F: FnMut(usize, Arc<Transaction>) -> Option<O>,
13561356
{
@@ -1470,7 +1470,7 @@ where
14701470
}
14711471
}
14721472

1473-
impl<'g, A, F, O> Iterator for TxDescendants<'g, A, F, O>
1473+
impl<A, F, O> Iterator for TxDescendants<'_, A, F, O>
14741474
where
14751475
F: FnMut(usize, Txid) -> Option<O>,
14761476
{

crates/chain/tests/test_local_chain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ enum ExpectedResult<'a> {
3030
Err(CannotConnectError),
3131
}
3232

33-
impl<'a> TestLocalChain<'a> {
33+
impl TestLocalChain<'_> {
3434
fn run(mut self) {
3535
let got_changeset = match self.chain.apply_update(self.update) {
3636
Ok(changeset) => changeset,

crates/core/src/spk_client.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub enum SyncItem<'i, I> {
2121
OutPoint(OutPoint),
2222
}
2323

24-
impl<'i, I: core::fmt::Debug + core::any::Any> core::fmt::Display for SyncItem<'i, I> {
24+
impl<I: core::fmt::Debug + core::any::Any> core::fmt::Display for SyncItem<'_, I> {
2525
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2626
match self {
2727
SyncItem::Spk(i, spk) => {
@@ -485,7 +485,7 @@ struct KeychainSpkIter<'r, K> {
485485
inspect: &'r mut Box<InspectFullScan<K>>,
486486
}
487487

488-
impl<'r, K: Ord + Clone> Iterator for KeychainSpkIter<'r, K> {
488+
impl<K: Ord + Clone> Iterator for KeychainSpkIter<'_, K> {
489489
type Item = Indexed<ScriptBuf>;
490490

491491
fn next(&mut self) -> Option<Self::Item> {
@@ -511,7 +511,7 @@ impl<'r, I, Item> SyncIter<'r, I, Item> {
511511

512512
impl<'r, I, Item> ExactSizeIterator for SyncIter<'r, I, Item> where SyncIter<'r, I, Item>: Iterator {}
513513

514-
impl<'r, I> Iterator for SyncIter<'r, I, ScriptBuf> {
514+
impl<I> Iterator for SyncIter<'_, I, ScriptBuf> {
515515
type Item = ScriptBuf;
516516

517517
fn next(&mut self) -> Option<Self::Item> {
@@ -524,7 +524,7 @@ impl<'r, I> Iterator for SyncIter<'r, I, ScriptBuf> {
524524
}
525525
}
526526

527-
impl<'r, I> Iterator for SyncIter<'r, I, Txid> {
527+
impl<I> Iterator for SyncIter<'_, I, Txid> {
528528
type Item = Txid;
529529

530530
fn next(&mut self) -> Option<Self::Item> {
@@ -537,7 +537,7 @@ impl<'r, I> Iterator for SyncIter<'r, I, Txid> {
537537
}
538538
}
539539

540-
impl<'r, I> Iterator for SyncIter<'r, I, OutPoint> {
540+
impl<I> Iterator for SyncIter<'_, I, OutPoint> {
541541
type Item = OutPoint;
542542

543543
fn next(&mut self) -> Option<Self::Item> {

crates/file_store/src/entry_iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl<'t, T> EntryIter<'t, T> {
3333
}
3434
}
3535

36-
impl<'t, T> Iterator for EntryIter<'t, T>
36+
impl<T> Iterator for EntryIter<'_, T>
3737
where
3838
T: serde::de::DeserializeOwned,
3939
{
@@ -71,7 +71,7 @@ where
7171
}
7272
}
7373

74-
impl<'t, T> Drop for EntryIter<'t, T> {
74+
impl<T> Drop for EntryIter<'_, T> {
7575
fn drop(&mut self) {
7676
// This syncs the underlying file's offset with the buffer's position. This way, we
7777
// maintain the correct position to start the next read/write.

crates/testenv/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub struct Config<'a> {
3939
pub electrsd: electrsd::Conf<'a>,
4040
}
4141

42-
impl<'a> Default for Config<'a> {
42+
impl Default for Config<'_> {
4343
/// Use the default configuration plus set `http_enabled = true` for [`electrsd::Conf`]
4444
/// which is required for testing `bdk_esplora`.
4545
fn default() -> Self {

crates/wallet/examples/compiler.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ use bdk_wallet::{KeychainKind, Wallet};
3030
/// can be derived from the policy.
3131
///
3232
/// This example demonstrates the interaction between a bdk wallet and miniscript policy.
33-
3433
#[allow(clippy::print_stdout)]
3534
fn main() -> Result<(), Box<dyn Error>> {
3635
// We start with a miniscript policy string

crates/wallet/examples/policy.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ use bdk_wallet::signer::SignersContainer;
2525
///
2626
/// This example demos a Policy output for a 2of2 multisig between between 2 parties, where the wallet holds
2727
/// one of the Extend Private key.
28-
2928
#[allow(clippy::print_stdout)]
3029
fn main() -> Result<(), Box<dyn Error>> {
3130
let secp = bitcoin::secp256k1::Secp256k1::new();

crates/wallet/src/descriptor/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,7 @@ impl IntoWalletDescriptor for (ExtendedDescriptor, KeyMap) {
145145
network: Network,
146146
}
147147

148-
impl<'s, 'd> miniscript::Translator<DescriptorPublicKey, String, DescriptorError>
149-
for Translator<'s, 'd>
150-
{
148+
impl miniscript::Translator<DescriptorPublicKey, String, DescriptorError> for Translator<'_, '_> {
151149
fn pk(&mut self, pk: &DescriptorPublicKey) -> Result<String, DescriptorError> {
152150
let secp = &self.secp;
153151

crates/wallet/src/keys/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ impl fmt::Display for KeyError {
982982
impl std::error::Error for KeyError {}
983983

984984
#[cfg(test)]
985-
pub mod test {
985+
mod test {
986986
use bitcoin::bip32;
987987

988988
use super::*;

crates/wallet/src/wallet/coin_selection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ mod test {
898898
.collect()
899899
}
900900

901-
fn sum_random_utxos(mut rng: &mut StdRng, utxos: &mut Vec<WeightedUtxo>) -> Amount {
901+
fn sum_random_utxos(mut rng: &mut StdRng, utxos: &mut [WeightedUtxo]) -> Amount {
902902
let utxos_picked_len = rng.gen_range(2..utxos.len() / 2);
903903
utxos.shuffle(&mut rng);
904904
utxos[..utxos_picked_len]

crates/wallet/src/wallet/persisted.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ impl<P: AsyncWalletPersister> PersistedWallet<P> {
254254
}
255255

256256
#[cfg(feature = "rusqlite")]
257-
impl<'c> WalletPersister for bdk_chain::rusqlite::Transaction<'c> {
257+
impl WalletPersister for bdk_chain::rusqlite::Transaction<'_> {
258258
type Error = bdk_chain::rusqlite::Error;
259259

260260
fn initialize(persister: &mut Self) -> Result<ChangeSet, Self::Error> {

crates/wallet/src/wallet/tx_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ impl<'a, Cs> TxBuilder<'a, Cs> {
644644
}
645645
}
646646

647-
impl<'a, Cs: CoinSelectionAlgorithm> TxBuilder<'a, Cs> {
647+
impl<Cs: CoinSelectionAlgorithm> TxBuilder<'_, Cs> {
648648
/// Finish building the transaction.
649649
///
650650
/// Uses the thread-local random number generator (rng).

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.82.0
1+
1.83.0

0 commit comments

Comments
 (0)