Skip to content

Commit

Permalink
for clippy of rust 1.83.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yito88 committed Nov 30, 2024
1 parent 57f0d4f commit a96100f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions crates/relayer/src/config/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl Serialize for ChannelFilters {
b: &'a FilterPattern<ChannelId>,
}

impl<'a> Serialize for Pair<'a> {
impl Serialize for Pair<'_> {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
Expand Down Expand Up @@ -378,7 +378,7 @@ pub(crate) mod port {

pub struct PortFilterMatchVisitor;

impl<'de> de::Visitor<'de> for PortFilterMatchVisitor {
impl de::Visitor<'_> for PortFilterMatchVisitor {
type Value = PortFilterMatch;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down Expand Up @@ -407,7 +407,7 @@ pub(crate) mod channel {

pub struct ChannelFilterMatchVisitor;

impl<'de> de::Visitor<'de> for ChannelFilterMatchVisitor {
impl de::Visitor<'_> for ChannelFilterMatchVisitor {
type Value = ChannelFilterMatch;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer/src/config/proof_specs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn serialize<S: Serializer>(

struct ProofSpecsVisitor;

impl<'de> de::Visitor<'de> for ProofSpecsVisitor {
impl de::Visitor<'_> for ProofSpecsVisitor {
type Value = Option<ProofSpecs>;

fn expecting(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
Expand Down
8 changes: 4 additions & 4 deletions crates/relayer/src/util/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::event::IbcEventWithHeight;

pub struct PrettyAny<'a>(pub &'a Any);

impl<'a> Display for PrettyAny<'a> {
impl Display for PrettyAny<'_> {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), FmtError> {
write!(f, "Any {{ type_url: {} }}", self.0.type_url)
}
Expand Down Expand Up @@ -97,7 +97,7 @@ impl Display for PrettyDuration<'_> {
/// For use in debug messages
pub struct PrettyEvents<'a>(pub &'a [IbcEventWithHeight]);

impl<'a> Display for PrettyEvents<'a> {
impl Display for PrettyEvents<'_> {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), FmtError> {
writeln!(f, "events:")?;
for v in self.0 {
Expand Down Expand Up @@ -180,7 +180,7 @@ impl Display for PrettyIdentifiedConnection<'_> {

pub struct PrettyOption<'a, T>(pub &'a Option<T>);

impl<'a, T: Display> Display for PrettyOption<'a, T> {
impl<T: Display> Display for PrettyOption<'_, T> {
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), FmtError> {
match &self.0 {
Some(v) => write!(f, "{v}"),
Expand All @@ -191,7 +191,7 @@ impl<'a, T: Display> Display for PrettyOption<'a, T> {

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 a96100f

Please sign in to comment.