chore: Fix lint issues (#222)
This commit is contained in:
parent
fe5e2d038d
commit
9d8ca617ef
5 changed files with 5 additions and 5 deletions
|
|
@ -17,7 +17,7 @@ fn main() {
|
|||
println!("{} {}", block.slot(), block.hash());
|
||||
|
||||
for tx in &block.txs() {
|
||||
println!("{:?}", tx);
|
||||
println!("{tx:?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ impl MachineError {
|
|||
}
|
||||
|
||||
pub fn invalid_msg<A: Agent>(state: &A::State, msg: &A::Message) -> Self {
|
||||
Self::InvalidMsgForState(format!("{:?}", state), format!("{:?}", msg))
|
||||
Self::InvalidMsgForState(format!("{state:?}"), format!("{msg:?}"))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ pub enum Error {
|
|||
|
||||
impl Error {
|
||||
pub fn invalid_cbor(error: impl Display) -> Self {
|
||||
Error::InvalidCbor(format!("{}", error))
|
||||
Error::InvalidCbor(format!("{error}"))
|
||||
}
|
||||
|
||||
pub fn unknown_cbor(bytes: &[u8]) -> Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue