From 6db66ed4508eca542dc0350df6c2b7728463e4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoe=20Faltib=C3=A0?= Date: Mon, 25 Nov 2024 13:35:12 +0100 Subject: [PATCH 1/2] fix nightly build --- src/persistence/stock.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index 4b778ca1..3be4102b 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -510,7 +510,7 @@ impl Stock { &'a self, ) -> Result< impl Iterator< - Item = > as IfaceWrapper>>::Info, + Item = > as IfaceWrapper>>::Info, > + 'a, StockError, > { From 62b48da94eb139cf0793596becac7d208a38e2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zoe=20Faltib=C3=A0?= Date: Mon, 2 Dec 2024 15:13:48 +0100 Subject: [PATCH 2/2] fix lint with 1.85.0-nightly --- src/containers/indexed.rs | 2 +- src/interface/contractum.rs | 6 +++--- src/persistence/memory.rs | 2 +- src/persistence/stock.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/containers/indexed.rs b/src/containers/indexed.rs index 355d8c28..f4b0f8cf 100644 --- a/src/containers/indexed.rs +++ b/src/containers/indexed.rs @@ -44,7 +44,7 @@ pub struct IndexedConsignment<'c, const TRANSFER: bool> { witness_idx: BTreeMap, } -impl<'c, const TRANSFER: bool> Deref for IndexedConsignment<'c, TRANSFER> { +impl Deref for IndexedConsignment<'_, TRANSFER> { type Target = Consignment; fn deref(&self) -> &Self::Target { self.consignment } diff --git a/src/interface/contractum.rs b/src/interface/contractum.rs index 01cbdbe6..107dc970 100644 --- a/src/interface/contractum.rs +++ b/src/interface/contractum.rs @@ -34,7 +34,7 @@ use super::{ struct ArgMapDisplay<'a>(&'a ArgMap); -impl<'a> Display for ArgMapDisplay<'a> { +impl Display for ArgMapDisplay<'_> { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { for (i, (name, occ)) in self.0.iter().enumerate() { if i > 0 { @@ -96,7 +96,7 @@ impl<'a> OpIfaceDisplay<'a> { } } -impl<'a> Display for OpIfaceDisplay<'a> { +impl Display for OpIfaceDisplay<'_> { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { if !self.errors.is_empty() { write!(f, "\t\terrors: ")?; @@ -159,7 +159,7 @@ impl<'a> IfaceDisplay<'a> { } } -impl<'a> Display for IfaceDisplay<'a> { +impl Display for IfaceDisplay<'_> { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { fn sugar(f: &mut Formatter<'_>, required: bool, multiple: bool) -> fmt::Result { match (required, multiple) { diff --git a/src/persistence/memory.rs b/src/persistence/memory.rs index 5b5d229e..930cb2ea 100644 --- a/src/persistence/memory.rs +++ b/src/persistence/memory.rs @@ -1129,7 +1129,7 @@ pub struct MemContractWriter<'mem> { contract: &'mem mut MemContractState, } -impl<'mem> ContractStateWrite for MemContractWriter<'mem> { +impl ContractStateWrite for MemContractWriter<'_> { type Error = MemError; /// # Panics diff --git a/src/persistence/stock.rs b/src/persistence/stock.rs index 3be4102b..817e19f8 100644 --- a/src/persistence/stock.rs +++ b/src/persistence/stock.rs @@ -505,7 +505,7 @@ impl Stock { Ok(self.stash.geneses()?.map(ContractInfo::with)) } - #[allow(clippy::multiple_bound_locations)] + #[allow(clippy::multiple_bound_locations, clippy::type_complexity)] pub fn contracts_by<'a, C: IfaceClass + 'a>( &'a self, ) -> Result<