Skip to content

Commit

Permalink
ci: fix clippy on 1.83 (auto)
Browse files Browse the repository at this point in the history
  • Loading branch information
dj8yf0μl committed Nov 28, 2024
1 parent e0a9b54 commit c3792f5
Show file tree
Hide file tree
Showing 14 changed files with 116 additions and 116 deletions.
2 changes: 1 addition & 1 deletion near-contract-standards/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
8 changes: 4 additions & 4 deletions near-sdk/src/collections/unordered_map/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ where
}
}

impl<'a, K, V> Iterator for Iter<'a, K, V>
impl<K, V> Iterator for Iter<'_, K, V>
where
K: BorshSerialize + BorshDeserialize,
V: BorshSerialize + BorshDeserialize,
Expand All @@ -56,20 +56,20 @@ where
}
}

impl<'a, K, V> ExactSizeIterator for Iter<'a, K, V>
impl<K, V> ExactSizeIterator for Iter<'_, K, V>
where
K: BorshSerialize + BorshDeserialize,
V: BorshSerialize + BorshDeserialize,
{
}
impl<'a, K, V> FusedIterator for Iter<'a, K, V>
impl<K, V> FusedIterator for Iter<'_, K, V>
where
K: BorshSerialize + BorshDeserialize,
V: BorshSerialize + BorshDeserialize,
{
}

impl<'a, K, V> DoubleEndedIterator for Iter<'a, K, V>
impl<K, V> DoubleEndedIterator for Iter<'_, K, V>
where
K: BorshSerialize + BorshDeserialize,
V: BorshSerialize + BorshDeserialize,
Expand Down
16 changes: 8 additions & 8 deletions near-sdk/src/collections/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ impl<'a, T> RawIter<'a, T> {
}
}

impl<'a, T> Iterator for RawIter<'a, T> {
impl<T> Iterator for RawIter<'_, T> {
type Item = Vec<u8>;

fn next(&mut self) -> Option<Self::Item> {
Expand All @@ -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<T> ExactSizeIterator for RawIter<'_, T> {}
impl<T> FusedIterator for RawIter<'_, T> {}

impl<'a, T> DoubleEndedIterator for RawIter<'a, T> {
impl<T> DoubleEndedIterator for RawIter<'_, T> {
fn next_back(&mut self) -> Option<Self::Item> {
<Self as DoubleEndedIterator>::nth_back(self, 0)
}
Expand All @@ -335,7 +335,7 @@ impl<'a, T> Iter<'a, T> {
}
}

impl<'a, T> Iterator for Iter<'a, T>
impl<T> Iterator for Iter<'_, T>
where
T: BorshDeserialize,
{
Expand All @@ -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<T> ExactSizeIterator for Iter<'_, T> where T: BorshDeserialize {}
impl<T> FusedIterator for Iter<'_, T> where T: BorshDeserialize {}

impl<'a, T> DoubleEndedIterator for Iter<'a, T>
impl<T> DoubleEndedIterator for Iter<'_, T>
where
T: BorshDeserialize,
{
Expand Down
20 changes: 10 additions & 10 deletions near-sdk/src/store/free_list/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> ExactSizeIterator for Iter<'_, T> where T: BorshSerialize + BorshDeserialize {}
impl<T> FusedIterator for Iter<'_, T> where T: BorshSerialize + BorshDeserialize {}

impl<'a, T> DoubleEndedIterator for Iter<'a, T>
impl<T> DoubleEndedIterator for Iter<'_, T>
where
T: BorshSerialize + BorshDeserialize,
{
Expand Down Expand Up @@ -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<T> ExactSizeIterator for IterMut<'_, T> where T: BorshSerialize + BorshDeserialize {}
impl<T> FusedIterator for IterMut<'_, T> where T: BorshSerialize + BorshDeserialize {}

impl<'a, T> DoubleEndedIterator for IterMut<'a, T>
impl<T> DoubleEndedIterator for IterMut<'_, T>
where
T: BorshSerialize + BorshDeserialize,
{
Expand Down Expand Up @@ -231,7 +231,7 @@ where
}
}

impl<'a, T> Iterator for Drain<'a, T>
impl<T> Iterator for Drain<'_, T>
where
T: BorshSerialize + BorshDeserialize,
{
Expand Down Expand Up @@ -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<T> ExactSizeIterator for Drain<'_, T> where T: BorshSerialize + BorshDeserialize {}
impl<T> FusedIterator for Drain<'_, T> where T: BorshSerialize + BorshDeserialize {}

impl<'a, T> DoubleEndedIterator for Drain<'a, T>
impl<T> DoubleEndedIterator for Drain<'_, T>
where
T: BorshSerialize + BorshDeserialize,
{
Expand Down
2 changes: 1 addition & 1 deletion near-sdk/src/store/iterable_map/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ where
}
}

impl<'a, K, V, H> Entry<'a, K, V, H>
impl<K, V, H> Entry<'_, K, V, H>
where
K: BorshSerialize + Ord + Clone,
V: BorshSerialize + BorshDeserialize,
Expand Down
36 changes: 18 additions & 18 deletions near-sdk/src/store/iterable_map/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,22 @@ where
}
}

impl<'a, K, V, H> ExactSizeIterator for Iter<'a, K, V, H>
impl<K, V, H> 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<K, V, H> FusedIterator for Iter<'_, K, V, H>
where
K: BorshSerialize + Ord + BorshDeserialize + Clone,
V: BorshSerialize + BorshDeserialize,
H: ToKey,
{
}

impl<'a, K, V, H> DoubleEndedIterator for Iter<'a, K, V, H>
impl<K, V, H> DoubleEndedIterator for Iter<'_, K, V, H>
where
K: BorshSerialize + Ord + BorshDeserialize + Clone,
V: BorshSerialize + BorshDeserialize,
Expand Down Expand Up @@ -190,22 +190,22 @@ where
}
}

impl<'a, K, V, H> ExactSizeIterator for IterMut<'a, K, V, H>
impl<K, V, H> 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<K, V, H> FusedIterator for IterMut<'_, K, V, H>
where
K: BorshSerialize + Ord + BorshDeserialize + Clone,
V: BorshSerialize + BorshDeserialize,
H: ToKey,
{
}

impl<'a, K, V, H> DoubleEndedIterator for IterMut<'a, K, V, H>
impl<K, V, H> DoubleEndedIterator for IterMut<'_, K, V, H>
where
K: BorshSerialize + Ord + BorshDeserialize + Clone,
V: BorshSerialize + BorshDeserialize,
Expand Down Expand Up @@ -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<K> ExactSizeIterator for Keys<'_, K> where K: BorshSerialize + BorshDeserialize {}
impl<K> FusedIterator for Keys<'_, K> where K: BorshSerialize + BorshDeserialize {}

impl<'a, K> DoubleEndedIterator for Keys<'a, K>
where
Expand Down Expand Up @@ -324,22 +324,22 @@ where
}
}

impl<'a, K, V, H> ExactSizeIterator for Values<'a, K, V, H>
impl<K, V, H> 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<K, V, H> FusedIterator for Values<'_, K, V, H>
where
K: BorshSerialize + Ord + BorshDeserialize + Clone,
V: BorshSerialize + BorshDeserialize,
H: ToKey,
{
}

impl<'a, K, V, H> DoubleEndedIterator for Values<'a, K, V, H>
impl<K, V, H> DoubleEndedIterator for Values<'_, K, V, H>
where
K: BorshSerialize + Ord + BorshDeserialize + Clone,
V: BorshSerialize + BorshDeserialize,
Expand Down Expand Up @@ -402,22 +402,22 @@ where
}
}

impl<'a, K, V, H> ExactSizeIterator for ValuesMut<'a, K, V, H>
impl<K, V, H> 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<K, V, H> FusedIterator for ValuesMut<'_, K, V, H>
where
K: BorshSerialize + Ord + BorshDeserialize + Clone,
V: BorshSerialize + BorshDeserialize,
H: ToKey,
{
}

impl<'a, K, V, H> DoubleEndedIterator for ValuesMut<'a, K, V, H>
impl<K, V, H> DoubleEndedIterator for ValuesMut<'_, K, V, H>
where
K: BorshSerialize + Ord + BorshDeserialize + Clone,
V: BorshSerialize + BorshDeserialize,
Expand Down Expand Up @@ -473,7 +473,7 @@ where
}
}

impl<'a, K, V, H> Iterator for Drain<'a, K, V, H>
impl<K, V, H> Iterator for Drain<'_, K, V, H>
where
K: BorshSerialize + BorshDeserialize + Ord + Clone,
V: BorshSerialize + BorshDeserialize,
Expand All @@ -496,23 +496,23 @@ where
}
}

impl<'a, K, V, H> ExactSizeIterator for Drain<'a, K, V, H>
impl<K, V, H> ExactSizeIterator for Drain<'_, K, V, H>
where
K: BorshSerialize + Ord + BorshDeserialize + Clone,
V: BorshSerialize + BorshDeserialize,
H: ToKey,
{
}

impl<'a, K, V, H> FusedIterator for Drain<'a, K, V, H>
impl<K, V, H> FusedIterator for Drain<'_, K, V, H>
where
K: BorshSerialize + Ord + BorshDeserialize + Clone,
V: BorshSerialize + BorshDeserialize,
H: ToKey,
{
}

impl<'a, K, V, H> DoubleEndedIterator for Drain<'a, K, V, H>
impl<K, V, H> DoubleEndedIterator for Drain<'_, K, V, H>
where
K: BorshSerialize + Ord + BorshDeserialize + Clone,
V: BorshSerialize + BorshDeserialize,
Expand Down
22 changes: 11 additions & 11 deletions near-sdk/src/store/iterable_set/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> ExactSizeIterator for Iter<'_, T> where T: BorshSerialize + Ord + BorshDeserialize {}
impl<T> FusedIterator for Iter<'_, T> where T: BorshSerialize + Ord + BorshDeserialize {}

impl<'a, T> DoubleEndedIterator for Iter<'a, T>
impl<T> DoubleEndedIterator for Iter<'_, T>
where
T: BorshSerialize + Ord + BorshDeserialize,
{
Expand Down Expand Up @@ -130,7 +130,7 @@ where
}
}

impl<'a, T, H> FusedIterator for Difference<'a, T, H>
impl<T, H> FusedIterator for Difference<'_, T, H>
where
T: BorshSerialize + Ord + BorshDeserialize + Clone,
H: ToKey,
Expand Down Expand Up @@ -184,7 +184,7 @@ where
}
}

impl<'a, T, H> FusedIterator for Intersection<'a, T, H>
impl<T, H> FusedIterator for Intersection<'_, T, H>
where
T: BorshSerialize + Ord + BorshDeserialize + Clone,
H: ToKey,
Expand Down Expand Up @@ -231,7 +231,7 @@ where
}
}

impl<'a, T, H> FusedIterator for SymmetricDifference<'a, T, H>
impl<T, H> FusedIterator for SymmetricDifference<'_, T, H>
where
T: BorshSerialize + Ord + BorshDeserialize + Clone,
H: ToKey,
Expand Down Expand Up @@ -278,7 +278,7 @@ where
}
}

impl<'a, T, H> FusedIterator for Union<'a, T, H>
impl<T, H> FusedIterator for Union<'_, T, H>
where
T: BorshSerialize + Ord + BorshDeserialize + Clone,
H: ToKey,
Expand Down Expand Up @@ -316,7 +316,7 @@ where
}
}

impl<'a, T, H> Iterator for Drain<'a, T, H>
impl<T, H> Iterator for Drain<'_, T, H>
where
T: BorshSerialize + BorshDeserialize + Ord + Clone,
H: ToKey,
Expand All @@ -339,21 +339,21 @@ where
}
}

impl<'a, T, H> ExactSizeIterator for Drain<'a, T, H>
impl<T, H> ExactSizeIterator for Drain<'_, T, H>
where
T: BorshSerialize + Ord + BorshDeserialize + Clone,
H: ToKey,
{
}

impl<'a, T, H> FusedIterator for Drain<'a, T, H>
impl<T, H> FusedIterator for Drain<'_, T, H>
where
T: BorshSerialize + Ord + BorshDeserialize + Clone,
H: ToKey,
{
}

impl<'a, T, H> DoubleEndedIterator for Drain<'a, T, H>
impl<T, H> DoubleEndedIterator for Drain<'_, T, H>
where
T: BorshSerialize + Ord + BorshDeserialize + Clone,
H: ToKey,
Expand Down
2 changes: 1 addition & 1 deletion near-sdk/src/store/tree_map/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ where
}
}

impl<'a, K, V> Entry<'a, K, V>
impl<K, V> Entry<'_, K, V>
where
K: BorshSerialize,
{
Expand Down
Loading

0 comments on commit c3792f5

Please sign in to comment.