Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix lint issues #222

Merged
merged 1 commit into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/block-decode/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn main() {
println!("{} {}", block.slot(), block.hash());

for tx in &block.txs() {
println!("{:?}", tx);
println!("{tx:?}");
}
}
}
2 changes: 1 addition & 1 deletion pallas-crypto/src/hash/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
2 changes: 1 addition & 1 deletion pallas-crypto/src/hash/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion pallas-miniprotocols/src/machines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:?}"))
}
}

Expand Down
2 changes: 1 addition & 1 deletion pallas-traverse/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down