From c3792f5485109d818093c8904d0e97b293d2a2bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Thu, 28 Nov 2024 18:01:22 +0200 Subject: [PATCH] ci: fix clippy on 1.83 (auto) --- near-contract-standards/src/event.rs | 2 +- .../src/collections/unordered_map/iter.rs | 8 ++-- near-sdk/src/collections/vector.rs | 16 ++++---- near-sdk/src/store/free_list/iter.rs | 20 +++++----- near-sdk/src/store/iterable_map/entry.rs | 2 +- near-sdk/src/store/iterable_map/iter.rs | 36 +++++++++--------- near-sdk/src/store/iterable_set/iter.rs | 22 +++++------ near-sdk/src/store/tree_map/entry.rs | 2 +- near-sdk/src/store/tree_map/iter.rs | 38 +++++++++---------- near-sdk/src/store/unordered_map/entry.rs | 2 +- near-sdk/src/store/unordered_map/iter.rs | 36 +++++++++--------- near-sdk/src/store/unordered_set/iter.rs | 22 +++++------ near-sdk/src/store/vec/iter.rs | 22 +++++------ near-sdk/src/utils/storage_key_impl.rs | 4 +- 14 files changed, 116 insertions(+), 116 deletions(-) diff --git a/near-contract-standards/src/event.rs b/near-contract-standards/src/event.rs index 6179578b9..1cb7e5354 100644 --- a/near-contract-standards/src/event.rs +++ b/near-contract-standards/src/event.rs @@ -12,7 +12,7 @@ pub(crate) enum NearEvent<'a> { Nep141(crate::fungible_token::events::Nep141Event<'a>), } -impl<'a> NearEvent<'a> { +impl NearEvent<'_> { fn to_json_string(&self) -> String { // Events cannot fail to serialize so fine to panic on error #[allow(clippy::redundant_closure)] diff --git a/near-sdk/src/collections/unordered_map/iter.rs b/near-sdk/src/collections/unordered_map/iter.rs index 557cff9d8..555d224fd 100644 --- a/near-sdk/src/collections/unordered_map/iter.rs +++ b/near-sdk/src/collections/unordered_map/iter.rs @@ -32,7 +32,7 @@ where } } -impl<'a, K, V> Iterator for Iter<'a, K, V> +impl Iterator for Iter<'_, K, V> where K: BorshSerialize + BorshDeserialize, V: BorshSerialize + BorshDeserialize, @@ -56,20 +56,20 @@ where } } -impl<'a, K, V> ExactSizeIterator for Iter<'a, K, V> +impl ExactSizeIterator for Iter<'_, K, V> where K: BorshSerialize + BorshDeserialize, V: BorshSerialize + BorshDeserialize, { } -impl<'a, K, V> FusedIterator for Iter<'a, K, V> +impl FusedIterator for Iter<'_, K, V> where K: BorshSerialize + BorshDeserialize, V: BorshSerialize + BorshDeserialize, { } -impl<'a, K, V> DoubleEndedIterator for Iter<'a, K, V> +impl DoubleEndedIterator for Iter<'_, K, V> where K: BorshSerialize + BorshDeserialize, V: BorshSerialize + BorshDeserialize, diff --git a/near-sdk/src/collections/vector.rs b/near-sdk/src/collections/vector.rs index 34ab6de6e..42825da06 100644 --- a/near-sdk/src/collections/vector.rs +++ b/near-sdk/src/collections/vector.rs @@ -288,7 +288,7 @@ impl<'a, T> RawIter<'a, T> { } } -impl<'a, T> Iterator for RawIter<'a, T> { +impl Iterator for RawIter<'_, T> { type Item = Vec; fn next(&mut self) -> Option { @@ -310,10 +310,10 @@ impl<'a, T> Iterator for RawIter<'a, T> { } } -impl<'a, T> ExactSizeIterator for RawIter<'a, T> {} -impl<'a, T> FusedIterator for RawIter<'a, T> {} +impl ExactSizeIterator for RawIter<'_, T> {} +impl FusedIterator for RawIter<'_, T> {} -impl<'a, T> DoubleEndedIterator for RawIter<'a, T> { +impl DoubleEndedIterator for RawIter<'_, T> { fn next_back(&mut self) -> Option { ::nth_back(self, 0) } @@ -335,7 +335,7 @@ impl<'a, T> Iter<'a, T> { } } -impl<'a, T> Iterator for Iter<'a, T> +impl Iterator for Iter<'_, T> where T: BorshDeserialize, { @@ -359,10 +359,10 @@ where } } -impl<'a, T> ExactSizeIterator for Iter<'a, T> where T: BorshDeserialize {} -impl<'a, T> FusedIterator for Iter<'a, T> where T: BorshDeserialize {} +impl ExactSizeIterator for Iter<'_, T> where T: BorshDeserialize {} +impl FusedIterator for Iter<'_, T> where T: BorshDeserialize {} -impl<'a, T> DoubleEndedIterator for Iter<'a, T> +impl DoubleEndedIterator for Iter<'_, T> where T: BorshDeserialize, { diff --git a/near-sdk/src/store/free_list/iter.rs b/near-sdk/src/store/free_list/iter.rs index 844ad73f3..083ee464f 100644 --- a/near-sdk/src/store/free_list/iter.rs +++ b/near-sdk/src/store/free_list/iter.rs @@ -90,10 +90,10 @@ where } } -impl<'a, T> ExactSizeIterator for Iter<'a, T> where T: BorshSerialize + BorshDeserialize {} -impl<'a, T> FusedIterator for Iter<'a, T> where T: BorshSerialize + BorshDeserialize {} +impl ExactSizeIterator for Iter<'_, T> where T: BorshSerialize + BorshDeserialize {} +impl FusedIterator for Iter<'_, T> where T: BorshSerialize + BorshDeserialize {} -impl<'a, T> DoubleEndedIterator for Iter<'a, T> +impl DoubleEndedIterator for Iter<'_, T> where T: BorshSerialize + BorshDeserialize, { @@ -174,10 +174,10 @@ where } } -impl<'a, T> ExactSizeIterator for IterMut<'a, T> where T: BorshSerialize + BorshDeserialize {} -impl<'a, T> FusedIterator for IterMut<'a, T> where T: BorshSerialize + BorshDeserialize {} +impl ExactSizeIterator for IterMut<'_, T> where T: BorshSerialize + BorshDeserialize {} +impl FusedIterator for IterMut<'_, T> where T: BorshSerialize + BorshDeserialize {} -impl<'a, T> DoubleEndedIterator for IterMut<'a, T> +impl DoubleEndedIterator for IterMut<'_, T> where T: BorshSerialize + BorshDeserialize, { @@ -231,7 +231,7 @@ where } } -impl<'a, T> Iterator for Drain<'a, T> +impl Iterator for Drain<'_, T> where T: BorshSerialize + BorshDeserialize, { @@ -263,10 +263,10 @@ where } } -impl<'a, T> ExactSizeIterator for Drain<'a, T> where T: BorshSerialize + BorshDeserialize {} -impl<'a, T> FusedIterator for Drain<'a, T> where T: BorshSerialize + BorshDeserialize {} +impl ExactSizeIterator for Drain<'_, T> where T: BorshSerialize + BorshDeserialize {} +impl FusedIterator for Drain<'_, T> where T: BorshSerialize + BorshDeserialize {} -impl<'a, T> DoubleEndedIterator for Drain<'a, T> +impl DoubleEndedIterator for Drain<'_, T> where T: BorshSerialize + BorshDeserialize, { diff --git a/near-sdk/src/store/iterable_map/entry.rs b/near-sdk/src/store/iterable_map/entry.rs index ec859897f..d97d7d817 100644 --- a/near-sdk/src/store/iterable_map/entry.rs +++ b/near-sdk/src/store/iterable_map/entry.rs @@ -34,7 +34,7 @@ where } } -impl<'a, K, V, H> Entry<'a, K, V, H> +impl Entry<'_, K, V, H> where K: BorshSerialize + Ord + Clone, V: BorshSerialize + BorshDeserialize, diff --git a/near-sdk/src/store/iterable_map/iter.rs b/near-sdk/src/store/iterable_map/iter.rs index 8eb784c4b..067206fd4 100644 --- a/near-sdk/src/store/iterable_map/iter.rs +++ b/near-sdk/src/store/iterable_map/iter.rs @@ -89,14 +89,14 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for Iter<'a, K, V, H> +impl ExactSizeIterator for Iter<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey, { } -impl<'a, K, V, H> FusedIterator for Iter<'a, K, V, H> +impl FusedIterator for Iter<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -104,7 +104,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for Iter<'a, K, V, H> +impl DoubleEndedIterator for Iter<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -190,14 +190,14 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for IterMut<'a, K, V, H> +impl ExactSizeIterator for IterMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey, { } -impl<'a, K, V, H> FusedIterator for IterMut<'a, K, V, H> +impl FusedIterator for IterMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -205,7 +205,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for IterMut<'a, K, V, H> +impl DoubleEndedIterator for IterMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -264,8 +264,8 @@ where } } -impl<'a, K> ExactSizeIterator for Keys<'a, K> where K: BorshSerialize + BorshDeserialize {} -impl<'a, K> FusedIterator for Keys<'a, K> where K: BorshSerialize + BorshDeserialize {} +impl ExactSizeIterator for Keys<'_, K> where K: BorshSerialize + BorshDeserialize {} +impl FusedIterator for Keys<'_, K> where K: BorshSerialize + BorshDeserialize {} impl<'a, K> DoubleEndedIterator for Keys<'a, K> where @@ -324,14 +324,14 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for Values<'a, K, V, H> +impl ExactSizeIterator for Values<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey, { } -impl<'a, K, V, H> FusedIterator for Values<'a, K, V, H> +impl FusedIterator for Values<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -339,7 +339,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for Values<'a, K, V, H> +impl DoubleEndedIterator for Values<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -402,14 +402,14 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for ValuesMut<'a, K, V, H> +impl ExactSizeIterator for ValuesMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey, { } -impl<'a, K, V, H> FusedIterator for ValuesMut<'a, K, V, H> +impl FusedIterator for ValuesMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -417,7 +417,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for ValuesMut<'a, K, V, H> +impl DoubleEndedIterator for ValuesMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -473,7 +473,7 @@ where } } -impl<'a, K, V, H> Iterator for Drain<'a, K, V, H> +impl Iterator for Drain<'_, K, V, H> where K: BorshSerialize + BorshDeserialize + Ord + Clone, V: BorshSerialize + BorshDeserialize, @@ -496,7 +496,7 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for Drain<'a, K, V, H> +impl ExactSizeIterator for Drain<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -504,7 +504,7 @@ where { } -impl<'a, K, V, H> FusedIterator for Drain<'a, K, V, H> +impl FusedIterator for Drain<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -512,7 +512,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for Drain<'a, K, V, H> +impl DoubleEndedIterator for Drain<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, diff --git a/near-sdk/src/store/iterable_set/iter.rs b/near-sdk/src/store/iterable_set/iter.rs index db45d5460..124329825 100644 --- a/near-sdk/src/store/iterable_set/iter.rs +++ b/near-sdk/src/store/iterable_set/iter.rs @@ -67,10 +67,10 @@ where } } -impl<'a, T> ExactSizeIterator for Iter<'a, T> where T: BorshSerialize + Ord + BorshDeserialize {} -impl<'a, T> FusedIterator for Iter<'a, T> where T: BorshSerialize + Ord + BorshDeserialize {} +impl ExactSizeIterator for Iter<'_, T> where T: BorshSerialize + Ord + BorshDeserialize {} +impl FusedIterator for Iter<'_, T> where T: BorshSerialize + Ord + BorshDeserialize {} -impl<'a, T> DoubleEndedIterator for Iter<'a, T> +impl DoubleEndedIterator for Iter<'_, T> where T: BorshSerialize + Ord + BorshDeserialize, { @@ -130,7 +130,7 @@ where } } -impl<'a, T, H> FusedIterator for Difference<'a, T, H> +impl FusedIterator for Difference<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, @@ -184,7 +184,7 @@ where } } -impl<'a, T, H> FusedIterator for Intersection<'a, T, H> +impl FusedIterator for Intersection<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, @@ -231,7 +231,7 @@ where } } -impl<'a, T, H> FusedIterator for SymmetricDifference<'a, T, H> +impl FusedIterator for SymmetricDifference<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, @@ -278,7 +278,7 @@ where } } -impl<'a, T, H> FusedIterator for Union<'a, T, H> +impl FusedIterator for Union<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, @@ -316,7 +316,7 @@ where } } -impl<'a, T, H> Iterator for Drain<'a, T, H> +impl Iterator for Drain<'_, T, H> where T: BorshSerialize + BorshDeserialize + Ord + Clone, H: ToKey, @@ -339,21 +339,21 @@ where } } -impl<'a, T, H> ExactSizeIterator for Drain<'a, T, H> +impl ExactSizeIterator for Drain<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, { } -impl<'a, T, H> FusedIterator for Drain<'a, T, H> +impl FusedIterator for Drain<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, { } -impl<'a, T, H> DoubleEndedIterator for Drain<'a, T, H> +impl DoubleEndedIterator for Drain<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, diff --git a/near-sdk/src/store/tree_map/entry.rs b/near-sdk/src/store/tree_map/entry.rs index fcb8d5d92..ccd36db35 100644 --- a/near-sdk/src/store/tree_map/entry.rs +++ b/near-sdk/src/store/tree_map/entry.rs @@ -24,7 +24,7 @@ where } } -impl<'a, K, V> Entry<'a, K, V> +impl Entry<'_, K, V> where K: BorshSerialize, { diff --git a/near-sdk/src/store/tree_map/iter.rs b/near-sdk/src/store/tree_map/iter.rs index 629cdd3da..f1e4018ef 100644 --- a/near-sdk/src/store/tree_map/iter.rs +++ b/near-sdk/src/store/tree_map/iter.rs @@ -90,14 +90,14 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for Iter<'a, K, V, H> +impl ExactSizeIterator for Iter<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey, { } -impl<'a, K, V, H> FusedIterator for Iter<'a, K, V, H> +impl FusedIterator for Iter<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -105,7 +105,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for Iter<'a, K, V, H> +impl DoubleEndedIterator for Iter<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -192,14 +192,14 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for IterMut<'a, K, V, H> +impl ExactSizeIterator for IterMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey, { } -impl<'a, K, V, H> FusedIterator for IterMut<'a, K, V, H> +impl FusedIterator for IterMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -207,7 +207,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for IterMut<'a, K, V, H> +impl DoubleEndedIterator for IterMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -483,8 +483,8 @@ where } } -impl<'a, K> ExactSizeIterator for Keys<'a, K> where K: BorshSerialize + BorshDeserialize + Ord {} -impl<'a, K> FusedIterator for Keys<'a, K> where K: BorshSerialize + BorshDeserialize + Ord {} +impl ExactSizeIterator for Keys<'_, K> where K: BorshSerialize + BorshDeserialize + Ord {} +impl FusedIterator for Keys<'_, K> where K: BorshSerialize + BorshDeserialize + Ord {} impl<'a, K> DoubleEndedIterator for Keys<'a, K> where @@ -623,7 +623,7 @@ where } } -impl<'a, K> FusedIterator for KeysRange<'a, K> where K: BorshSerialize + BorshDeserialize + Ord {} +impl FusedIterator for KeysRange<'_, K> where K: BorshSerialize + BorshDeserialize + Ord {} impl<'a, K> DoubleEndedIterator for KeysRange<'a, K> where @@ -724,14 +724,14 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for Values<'a, K, V, H> +impl ExactSizeIterator for Values<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey, { } -impl<'a, K, V, H> FusedIterator for Values<'a, K, V, H> +impl FusedIterator for Values<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -739,7 +739,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for Values<'a, K, V, H> +impl DoubleEndedIterator for Values<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -802,14 +802,14 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for ValuesMut<'a, K, V, H> +impl ExactSizeIterator for ValuesMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey, { } -impl<'a, K, V, H> FusedIterator for ValuesMut<'a, K, V, H> +impl FusedIterator for ValuesMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -817,7 +817,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for ValuesMut<'a, K, V, H> +impl DoubleEndedIterator for ValuesMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -884,7 +884,7 @@ where } } -impl<'a, K, V, H> FusedIterator for Range<'a, K, V, H> +impl FusedIterator for Range<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -892,7 +892,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for Range<'a, K, V, H> +impl DoubleEndedIterator for Range<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -961,7 +961,7 @@ where } } -impl<'a, K, V, H> FusedIterator for RangeMut<'a, K, V, H> +impl FusedIterator for RangeMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -969,7 +969,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for RangeMut<'a, K, V, H> +impl DoubleEndedIterator for RangeMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, diff --git a/near-sdk/src/store/unordered_map/entry.rs b/near-sdk/src/store/unordered_map/entry.rs index fe15b149e..1ec50f9b4 100644 --- a/near-sdk/src/store/unordered_map/entry.rs +++ b/near-sdk/src/store/unordered_map/entry.rs @@ -27,7 +27,7 @@ where } } -impl<'a, K, V> Entry<'a, K, V> +impl Entry<'_, K, V> where K: BorshSerialize, { diff --git a/near-sdk/src/store/unordered_map/iter.rs b/near-sdk/src/store/unordered_map/iter.rs index 7d28c6c42..f8c33157b 100644 --- a/near-sdk/src/store/unordered_map/iter.rs +++ b/near-sdk/src/store/unordered_map/iter.rs @@ -88,14 +88,14 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for Iter<'a, K, V, H> +impl ExactSizeIterator for Iter<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey, { } -impl<'a, K, V, H> FusedIterator for Iter<'a, K, V, H> +impl FusedIterator for Iter<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -103,7 +103,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for Iter<'a, K, V, H> +impl DoubleEndedIterator for Iter<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -189,14 +189,14 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for IterMut<'a, K, V, H> +impl ExactSizeIterator for IterMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey, { } -impl<'a, K, V, H> FusedIterator for IterMut<'a, K, V, H> +impl FusedIterator for IterMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -204,7 +204,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for IterMut<'a, K, V, H> +impl DoubleEndedIterator for IterMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -264,8 +264,8 @@ where } } -impl<'a, K> ExactSizeIterator for Keys<'a, K> where K: BorshSerialize + BorshDeserialize {} -impl<'a, K> FusedIterator for Keys<'a, K> where K: BorshSerialize + BorshDeserialize {} +impl ExactSizeIterator for Keys<'_, K> where K: BorshSerialize + BorshDeserialize {} +impl FusedIterator for Keys<'_, K> where K: BorshSerialize + BorshDeserialize {} impl<'a, K> DoubleEndedIterator for Keys<'a, K> where @@ -325,14 +325,14 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for Values<'a, K, V, H> +impl ExactSizeIterator for Values<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey, { } -impl<'a, K, V, H> FusedIterator for Values<'a, K, V, H> +impl FusedIterator for Values<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -340,7 +340,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for Values<'a, K, V, H> +impl DoubleEndedIterator for Values<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -403,14 +403,14 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for ValuesMut<'a, K, V, H> +impl ExactSizeIterator for ValuesMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey, { } -impl<'a, K, V, H> FusedIterator for ValuesMut<'a, K, V, H> +impl FusedIterator for ValuesMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -418,7 +418,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for ValuesMut<'a, K, V, H> +impl DoubleEndedIterator for ValuesMut<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -474,7 +474,7 @@ where } } -impl<'a, K, V, H> Iterator for Drain<'a, K, V, H> +impl Iterator for Drain<'_, K, V, H> where K: BorshSerialize + BorshDeserialize + Ord + Clone, V: BorshSerialize + BorshDeserialize, @@ -497,7 +497,7 @@ where } } -impl<'a, K, V, H> ExactSizeIterator for Drain<'a, K, V, H> +impl ExactSizeIterator for Drain<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -505,7 +505,7 @@ where { } -impl<'a, K, V, H> FusedIterator for Drain<'a, K, V, H> +impl FusedIterator for Drain<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, @@ -513,7 +513,7 @@ where { } -impl<'a, K, V, H> DoubleEndedIterator for Drain<'a, K, V, H> +impl DoubleEndedIterator for Drain<'_, K, V, H> where K: BorshSerialize + Ord + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, diff --git a/near-sdk/src/store/unordered_set/iter.rs b/near-sdk/src/store/unordered_set/iter.rs index a31dab95d..024825fdf 100644 --- a/near-sdk/src/store/unordered_set/iter.rs +++ b/near-sdk/src/store/unordered_set/iter.rs @@ -67,10 +67,10 @@ where } } -impl<'a, T> ExactSizeIterator for Iter<'a, T> where T: BorshSerialize + Ord + BorshDeserialize {} -impl<'a, T> FusedIterator for Iter<'a, T> where T: BorshSerialize + Ord + BorshDeserialize {} +impl ExactSizeIterator for Iter<'_, T> where T: BorshSerialize + Ord + BorshDeserialize {} +impl FusedIterator for Iter<'_, T> where T: BorshSerialize + Ord + BorshDeserialize {} -impl<'a, T> DoubleEndedIterator for Iter<'a, T> +impl DoubleEndedIterator for Iter<'_, T> where T: BorshSerialize + Ord + BorshDeserialize, { @@ -130,7 +130,7 @@ where } } -impl<'a, T, H> FusedIterator for Difference<'a, T, H> +impl FusedIterator for Difference<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, @@ -184,7 +184,7 @@ where } } -impl<'a, T, H> FusedIterator for Intersection<'a, T, H> +impl FusedIterator for Intersection<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, @@ -231,7 +231,7 @@ where } } -impl<'a, T, H> FusedIterator for SymmetricDifference<'a, T, H> +impl FusedIterator for SymmetricDifference<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, @@ -278,7 +278,7 @@ where } } -impl<'a, T, H> FusedIterator for Union<'a, T, H> +impl FusedIterator for Union<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, @@ -316,7 +316,7 @@ where } } -impl<'a, T, H> Iterator for Drain<'a, T, H> +impl Iterator for Drain<'_, T, H> where T: BorshSerialize + BorshDeserialize + Ord + Clone, H: ToKey, @@ -339,21 +339,21 @@ where } } -impl<'a, T, H> ExactSizeIterator for Drain<'a, T, H> +impl ExactSizeIterator for Drain<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, { } -impl<'a, T, H> FusedIterator for Drain<'a, T, H> +impl FusedIterator for Drain<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, { } -impl<'a, T, H> DoubleEndedIterator for Drain<'a, T, H> +impl DoubleEndedIterator for Drain<'_, T, H> where T: BorshSerialize + Ord + BorshDeserialize + Clone, H: ToKey, diff --git a/near-sdk/src/store/vec/iter.rs b/near-sdk/src/store/vec/iter.rs index cbb7da783..171c35bf0 100644 --- a/near-sdk/src/store/vec/iter.rs +++ b/near-sdk/src/store/vec/iter.rs @@ -55,10 +55,10 @@ where } } -impl<'a, T> ExactSizeIterator for Iter<'a, T> where T: BorshSerialize + BorshDeserialize {} -impl<'a, T> FusedIterator for Iter<'a, T> where T: BorshSerialize + BorshDeserialize {} +impl ExactSizeIterator for Iter<'_, T> where T: BorshSerialize + BorshDeserialize {} +impl FusedIterator for Iter<'_, T> where T: BorshSerialize + BorshDeserialize {} -impl<'a, T> DoubleEndedIterator for Iter<'a, T> +impl DoubleEndedIterator for Iter<'_, T> where T: BorshSerialize + BorshDeserialize, { @@ -140,10 +140,10 @@ where } } -impl<'a, T> ExactSizeIterator for IterMut<'a, T> where T: BorshSerialize + BorshDeserialize {} -impl<'a, T> FusedIterator for IterMut<'a, T> where T: BorshSerialize + BorshDeserialize {} +impl ExactSizeIterator for IterMut<'_, T> where T: BorshSerialize + BorshDeserialize {} +impl FusedIterator for IterMut<'_, T> where T: BorshSerialize + BorshDeserialize {} -impl<'a, T> DoubleEndedIterator for IterMut<'a, T> +impl DoubleEndedIterator for IterMut<'_, T> where T: BorshSerialize + BorshDeserialize, { @@ -194,7 +194,7 @@ where } } -impl<'a, T> Drop for Drain<'a, T> +impl Drop for Drain<'_, T> where T: BorshSerialize + BorshDeserialize, { @@ -218,7 +218,7 @@ where } } -impl<'a, T> Iterator for Drain<'a, T> +impl Iterator for Drain<'_, T> where T: BorshSerialize + BorshDeserialize, { @@ -252,10 +252,10 @@ where } } -impl<'a, T> ExactSizeIterator for Drain<'a, T> where T: BorshSerialize + BorshDeserialize {} -impl<'a, T> FusedIterator for Drain<'a, T> where T: BorshSerialize + BorshDeserialize {} +impl ExactSizeIterator for Drain<'_, T> where T: BorshSerialize + BorshDeserialize {} +impl FusedIterator for Drain<'_, T> where T: BorshSerialize + BorshDeserialize {} -impl<'a, T> DoubleEndedIterator for Drain<'a, T> +impl DoubleEndedIterator for Drain<'_, T> where T: BorshSerialize + BorshDeserialize, { diff --git a/near-sdk/src/utils/storage_key_impl.rs b/near-sdk/src/utils/storage_key_impl.rs index 843f3070f..fa4493f6e 100644 --- a/near-sdk/src/utils/storage_key_impl.rs +++ b/near-sdk/src/utils/storage_key_impl.rs @@ -13,14 +13,14 @@ impl IntoStorageKey for Vec { } } -impl<'a> IntoStorageKey for &'a [u8] { +impl IntoStorageKey for &[u8] { #[inline] fn into_storage_key(self) -> Vec { self.to_vec() } } -impl<'a> IntoStorageKey for &'a [u8; 1] { +impl IntoStorageKey for &[u8; 1] { #[inline] fn into_storage_key(self) -> Vec { self.to_vec()