Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix clippy on 1.83 (auto) #1266

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading