chore: clippy happy (#12419)

This commit is contained in:
Matthias Seitz
2024-11-09 08:29:27 +01:00
committed by GitHub
parent 5cfe9a9879
commit f86efcc800
2 changed files with 2 additions and 5 deletions

View File

@ -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!(

View File

@ -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}")
}
}