Skip to content

Commit e204c37

Browse files
committed
chore: clippy lints
1 parent 8832070 commit e204c37

File tree

5 files changed

+14
-22
lines changed

5 files changed

+14
-22
lines changed

crates/msgs/bridge/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl InterprotoMsg for BridgeIncomingMsg {
146146
}
147147
}
148148

149-
#[allow(unreachable_pub, reason = "used by ssz_derive field adapters")]
149+
#[expect(unreachable_pub, reason = "used by ssz_derive field adapters")]
150150
mod descriptor_ssz {
151151
use super::Descriptor;
152152

crates/params/src/subprotocols/admin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl AdministrationInitConfig {
8888
}
8989
}
9090

91-
#[allow(unreachable_pub, reason = "used by ssz_derive field adapters")]
91+
#[expect(unreachable_pub, reason = "used by ssz_derive field adapters")]
9292
mod non_zero_u8 {
9393
pub mod encode {
9494
use std::num::NonZero;

crates/subprotocols/admin/src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl AdministrationSubprotoState {
132132
}
133133
}
134134

135-
#[allow(unreachable_pub, reason = "used by ssz_derive field adapters")]
135+
#[expect(unreachable_pub, reason = "used by ssz_derive field adapters")]
136136
mod non_zero_u8 {
137137
pub mod encode {
138138
use std::num::NonZero;

crates/subprotocols/checkpoint-v0/src/types.rs

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl CheckpointV0VerifierState {
112112
}
113113
}
114114

115-
#[allow(unreachable_pub, reason = "used by ssz_derive field adapters")]
115+
#[expect(unreachable_pub, reason = "used by ssz_derive field adapters")]
116116
mod cred_rule_ssz {
117117
use super::{Buf32, CredRule};
118118

@@ -180,7 +180,7 @@ mod cred_rule_ssz {
180180
}
181181
}
182182

183-
#[allow(unreachable_pub, reason = "used by ssz_derive field adapters")]
183+
#[expect(unreachable_pub, reason = "used by ssz_derive field adapters")]
184184
mod legacy_checkpoint_ssz {
185185
use ssz_derive::{Decode, Encode};
186186

@@ -205,27 +205,19 @@ mod legacy_checkpoint_ssz {
205205
<LegacyCheckpointSsz as SszEncode>::ssz_fixed_len()
206206
}
207207

208-
#[allow(
209-
deprecated,
210-
reason = "checkpoint-v0 persists the last verified legacy checkpoint payload"
211-
)]
212208
pub fn ssz_bytes_len(value: &Option<Checkpoint>) -> usize {
213209
to_ssz(value).ssz_bytes_len()
214210
}
215211

216-
#[allow(
217-
deprecated,
218-
reason = "checkpoint-v0 persists the last verified legacy checkpoint payload"
219-
)]
220212
pub fn ssz_append(value: &Option<Checkpoint>, buf: &mut Vec<u8>) {
221213
to_ssz(value).ssz_append(buf);
222214
}
223215

224-
#[allow(
225-
deprecated,
226-
reason = "checkpoint-v0 persists the last verified legacy checkpoint payload"
227-
)]
228216
fn to_ssz(value: &Option<Checkpoint>) -> LegacyCheckpointSsz {
217+
#[expect(
218+
deprecated,
219+
reason = "checkpoint-v0 persists the last verified legacy checkpoint payload"
220+
)]
229221
let checkpoint_bytes = value
230222
.as_ref()
231223
.map(Checkpoint::to_raw_bytes)
@@ -253,13 +245,13 @@ mod legacy_checkpoint_ssz {
253245
<LegacyCheckpointSsz as SszDecode>::ssz_fixed_len()
254246
}
255247

256-
#[allow(
257-
deprecated,
258-
reason = "checkpoint-v0 state may still contain a legacy checkpoint payload"
259-
)]
260248
pub fn from_ssz_bytes(bytes: &[u8]) -> Result<Option<Checkpoint>, DecodeError> {
261249
let value = LegacyCheckpointSsz::from_ssz_bytes(bytes)?;
262250
if value.has_checkpoint {
251+
#[expect(
252+
deprecated,
253+
reason = "checkpoint-v0 state may still contain a legacy checkpoint payload"
254+
)]
263255
Checkpoint::from_raw_bytes(&value.checkpoint_bytes)
264256
.map(Some)
265257
.map_err(|err| DecodeError::BytesInvalid(err.to_string()))

crates/subprotocols/checkpoint/src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl CheckpointState {
169169
}
170170
}
171171

172-
#[allow(unreachable_pub, reason = "used by ssz_derive field adapters")]
172+
#[expect(unreachable_pub, reason = "used by ssz_derive field adapters")]
173173
mod available_funds_ssz {
174174
use ssz_derive::{Decode, Encode};
175175
use strata_btc_types::BitcoinAmount;

0 commit comments

Comments
 (0)