mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: clippy happy (#12419)
This commit is contained in:
@ -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!(
|
||||
|
||||
@ -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}")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user