From 935643a483534c5d72615c1753913e24fd9c70e7 Mon Sep 17 00:00:00 2001 From: Santiago Carmuega Date: Sun, 4 Aug 2024 09:09:08 -0300 Subject: [PATCH] fix lints --- src/mapper/conway.rs | 7 ++----- src/sources/common.rs | 6 +++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/mapper/conway.rs b/src/mapper/conway.rs index 824d095e..8b07fc9e 100644 --- a/src/mapper/conway.rs +++ b/src/mapper/conway.rs @@ -1,5 +1,3 @@ -use std::ops::Deref; - use pallas_codec::utils::{KeepRaw, NonZeroInt}; use pallas_primitives::conway::{ @@ -229,9 +227,8 @@ impl EventWriter { witnesses .redeemer .iter() - .map(|i| i.iter()) - .flatten() - .map(|(k, v)| self.to_conway_redeemer_record(&k, &v)) + .flat_map(|i| i.iter()) + .map(|(k, v)| self.to_conway_redeemer_record(k, v)) .collect::>()?, ); diff --git a/src/sources/common.rs b/src/sources/common.rs index 713e5d87..7731a555 100644 --- a/src/sources/common.rs +++ b/src/sources/common.rs @@ -68,9 +68,9 @@ impl FromStr for PointArg { } } -impl ToString for PointArg { - fn to_string(&self) -> String { - format!("{},{}", self.0, self.1) +impl std::fmt::Display for PointArg { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{},{}", self.0, self.1) } }