Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
rnbguy committed Nov 26, 2024
1 parent ac814d7 commit 7f1f404
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ibc-core/ics04-channel/types/src/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub struct Packet {

struct PacketData<'a>(&'a [u8]);

impl<'a> core::fmt::Debug for PacketData<'a> {
impl core::fmt::Debug for PacketData<'_> {
fn fmt(&self, formatter: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> {
write!(formatter, "{:?}", self.0)
}
Expand Down
2 changes: 1 addition & 1 deletion ibc-core/ics24-host/types/src/identifiers/chain_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<'de> Deserialize<'de> for ChainId {
{
struct FieldVisitor;

impl<'de> Visitor<'de> for FieldVisitor {
impl Visitor<'_> for FieldVisitor {
type Value = Field;

fn expecting(&self, formatter: &mut Formatter<'_>) -> core::fmt::Result {
Expand Down
2 changes: 0 additions & 2 deletions ibc-core/ics26-routing/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,13 @@ pub trait Module: Debug {
) -> (ModuleExtras, Result<(), ChannelError>);

/// Note: `MsgTimeout` and `MsgTimeoutOnClose` use the same callback

fn on_timeout_packet_validate(
&self,
packet: &Packet,
relayer: &Signer,
) -> Result<(), ChannelError>;

/// Note: `MsgTimeout` and `MsgTimeoutOnClose` use the same callback

fn on_timeout_packet_execute(
&mut self,
packet: &Packet,
Expand Down
2 changes: 1 addition & 1 deletion ibc-primitives/src/utils/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use core::fmt::{Display, Error as FmtError, Formatter};
/// A slice type that implements the `Display` trait to pretty-print the contained elements.
pub struct PrettySlice<'a, T>(pub &'a [T]);

impl<'a, T: Display> Display for PrettySlice<'a, T> {
impl<T: Display> Display for PrettySlice<'_, T> {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), FmtError> {
write!(f, "[ ")?;
let mut vec_iterator = self.0.iter().peekable();
Expand Down

0 comments on commit 7f1f404

Please sign in to comment.