Skip to content

Commit dcbf26e

Browse files
authored
bump nightly toolchain and fix lints (#167)
1 parent 88d56ab commit dcbf26e

File tree

7 files changed

+9
-10
lines changed

7 files changed

+9
-10
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SHELL := /usr/bin/env bash
2-
NIGHTLY_TOOLCHAIN := nightly-2024-11-22
2+
NIGHTLY_TOOLCHAIN := nightly-2025-10-07
33
SOLANA_VERSION := 3.0.0
44

55
.PHONY: audit build-test-programs prepublish publish format format-check \

bencher/src/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Solana CLI Version: {}
9393
)
9494
}
9595

96-
fn parse_last_md_table(content: &str) -> Vec<MolluskComputeUnitBenchResult> {
96+
fn parse_last_md_table(content: &str) -> Vec<MolluskComputeUnitBenchResult<'_>> {
9797
let mut results = vec![];
9898

9999
for line in content.lines().skip(6) {

harness/src/epoch_stake.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ pub fn create_mock_epoch_stake(target_total: u64) -> EpochStake {
2020
let base_stake = target_total / num_accounts;
2121
let remainder = target_total % num_accounts;
2222

23-
std::iter::repeat(base_stake)
24-
.take(num_accounts as usize - 1)
23+
std::iter::repeat_n(base_stake, num_accounts as usize - 1)
2524
.chain(std::iter::once(base_stake + remainder))
2625
.for_each(|stake| {
2726
epoch_stake.insert(Pubkey::new_unique(), stake);

harness/src/program.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl ProgramCache {
8484
me
8585
}
8686

87-
pub(crate) fn cache(&self) -> RefMut<ProgramCacheForTxBatch> {
87+
pub(crate) fn cache(&self) -> RefMut<'_, ProgramCacheForTxBatch> {
8888
self.cache.borrow_mut()
8989
}
9090

harness/tests/bpf_program.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ fn test_transfer() {
152152
],
153153
&[
154154
Check::success(),
155-
Check::compute_units(2533),
155+
Check::compute_units(2534),
156156
Check::account(&payer)
157157
.lamports(payer_lamports - transfer_amount)
158158
.build(),
@@ -256,7 +256,7 @@ fn test_close_account() {
256256
],
257257
&[
258258
Check::success(),
259-
Check::compute_units(2608),
259+
Check::compute_units(2609),
260260
Check::account(&key)
261261
.closed() // The rest is unnecessary, just testing.
262262
.data(&[])
@@ -376,7 +376,7 @@ fn test_cpi() {
376376
],
377377
&[
378378
Check::success(),
379-
Check::compute_units(2418),
379+
Check::compute_units(2371),
380380
Check::account(&key)
381381
.data(data)
382382
.lamports(lamports)

result/src/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl<'a> Check<'a> {
7171
}
7272

7373
/// Check a resulting account after executing the instruction.
74-
pub fn account(pubkey: &Pubkey) -> AccountCheckBuilder {
74+
pub fn account(pubkey: &Pubkey) -> AccountCheckBuilder<'_> {
7575
AccountCheckBuilder::new(pubkey)
7676
}
7777

test-programs/primary/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ fn process_instruction(
9595
vec![AccountMeta::new(*account_info.key, true)],
9696
);
9797

98-
invoke(&instruction, &[account_info.clone()])?;
98+
invoke(&instruction, std::slice::from_ref(account_info))?;
9999
}
100100
Some((5, _)) => {
101101
// Load the same account twice and assert both infos share the

0 commit comments

Comments
 (0)