chore: Fix lint issues (#222)

This commit is contained in:
Santiago Carmuega 2023-02-03 01:07:14 +01:00 committed by GitHub
parent fe5e2d038d
commit 9d8ca617ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View file

@ -46,7 +46,7 @@ impl<const BYTES: usize> PartialEq<[u8]> for Hash<BYTES> {
impl<const BYTES: usize> fmt::Debug for Hash<BYTES> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple(&format!("Hash<{size}>", size = BYTES))
f.debug_tuple(&format!("Hash<{BYTES}>"))
.field(&hex::encode(self))
.finish()
}

View file

@ -21,7 +21,7 @@ impl<'de, const BYTES: usize> Visitor<'de> for HashVisitor<BYTES> {
type Value = Hash<BYTES>;
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
write!(formatter, "a hex string representing {} bytes", BYTES)
write!(formatter, "a hex string representing {BYTES} bytes")
}
fn visit_str<E>(self, s: &str) -> Result<Self::Value, E>