Skip to content

Commit

Permalink
chore: clippy happy (#12419)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Nov 9, 2024
1 parent 5cfe9a9 commit f86efcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/node/core/src/args/payload_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl TypedValueParser for ExtradataValueParser {
) -> Result<Self::Value, clap::Error> {
let val =
value.to_str().ok_or_else(|| clap::Error::new(clap::error::ErrorKind::InvalidUtf8))?;
if val.as_bytes().len() > MAXIMUM_EXTRA_DATA_SIZE {
if val.len() > MAXIMUM_EXTRA_DATA_SIZE {
return Err(clap::Error::raw(
clap::error::ErrorKind::InvalidValue,
format!(
Expand Down
5 changes: 1 addition & 4 deletions crates/node/core/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ mod tests {
#[test]
fn assert_extradata_less_32bytes() {
let extradata = default_extradata();
assert!(
extradata.as_bytes().len() <= 32,
"extradata must be less than 32 bytes: {extradata}"
)
assert!(extradata.len() <= 32, "extradata must be less than 32 bytes: {extradata}")
}
}

0 comments on commit f86efcc

Please sign in to comment.