Skip to content

Commit

Permalink
format: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
fusede committed Jan 31, 2025
1 parent 0518856 commit b621bd1
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 28 deletions.
24 changes: 16 additions & 8 deletions map-utils/src/btree_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ where

type V = V;

type VacantEntry<'a> = btree_map::VacantEntry<'a, K, V>
type VacantEntry<'a>
= btree_map::VacantEntry<'a, K, V>
where
Self: 'a;

type OccupiedEntry<'a> = btree_map::OccupiedEntry<'a, K, V>
type OccupiedEntry<'a>
= btree_map::OccupiedEntry<'a, K, V>
where
Self: 'a;

Expand Down Expand Up @@ -124,27 +126,33 @@ impl<K, V> IterableMap for BTreeMap<K, V>
where
K: Eq + Ord,
{
type Keys<'a> = btree_map::Keys<'a, K, V>
type Keys<'a>
= btree_map::Keys<'a, K, V>
where
Self: 'a;

type Values<'a> = btree_map::Values<'a, K, V>
type Values<'a>
= btree_map::Values<'a, K, V>
where
Self: 'a;

type ValuesMut<'a> = btree_map::ValuesMut<'a, K, V>
type ValuesMut<'a>
= btree_map::ValuesMut<'a, K, V>
where
Self: 'a;

type Iter<'a> = btree_map::Iter<'a, K, V>
type Iter<'a>
= btree_map::Iter<'a, K, V>
where
Self: 'a;

type IterMut<'a> = btree_map::IterMut<'a, K, V>
type IterMut<'a>
= btree_map::IterMut<'a, K, V>
where
Self: 'a;

type Drain<'a> = btree_map::IntoIter<K, V>
type Drain<'a>
= btree_map::IntoIter<K, V>
where
Self: 'a;

Expand Down
28 changes: 18 additions & 10 deletions map-utils/src/hash_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ where

type V = V;

type VacantEntry<'a> = hash_map::VacantEntry<'a, K, V>
type VacantEntry<'a>
= hash_map::VacantEntry<'a, K, V>
where
Self: 'a;

type OccupiedEntry<'a> = hash_map::OccupiedEntry<'a, K, V>
type OccupiedEntry<'a>
= hash_map::OccupiedEntry<'a, K, V>
where
Self: 'a;

Expand Down Expand Up @@ -118,29 +120,35 @@ impl<K, V> IterableMap for HashMap<K, V>
where
K: Eq + Hash,
{
type Keys<'a> = hash_map::Keys<'a, K, V>
type Keys<'a>
= hash_map::Keys<'a, K, V>
where
Self: 'a;

type Values<'a> = hash_map::Values<'a, K, V>
type Values<'a>
= hash_map::Values<'a, K, V>
where
Self: 'a;

type ValuesMut<'a> = hash_map::ValuesMut<'a, K, V>
type ValuesMut<'a>
= hash_map::ValuesMut<'a, K, V>
where
Self: 'a;

type Iter<'a> = hash_map::Iter<'a, K, V>
type Iter<'a>
= hash_map::Iter<'a, K, V>
where
Self: 'a;

type IterMut<'a> = hash_map::IterMut<'a, K, V>
type IterMut<'a>
= hash_map::IterMut<'a, K, V>
where
Self: 'a;

type Drain<'a> = hash_map::Drain<'a, K, V>
where
Self: 'a;
type Drain<'a>
= hash_map::Drain<'a, K, V>
where
Self: 'a;

#[inline]
fn len(&self) -> usize {
Expand Down
30 changes: 20 additions & 10 deletions map-utils/src/near.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ where

type V = V;

type VacantEntry<'a> = lookup_map::VacantEntry<'a, K, V>
type VacantEntry<'a>
= lookup_map::VacantEntry<'a, K, V>
where
Self: 'a;

type OccupiedEntry<'a> = lookup_map::OccupiedEntry<'a, K, V>
type OccupiedEntry<'a>
= lookup_map::OccupiedEntry<'a, K, V>
where
Self: 'a;

Expand Down Expand Up @@ -128,11 +130,13 @@ where

type V = V;

type VacantEntry<'a> = iterable_map::VacantEntry<'a, K, V, H>
type VacantEntry<'a>
= iterable_map::VacantEntry<'a, K, V, H>
where
Self: 'a;

type OccupiedEntry<'a> = iterable_map::OccupiedEntry<'a, K, V, H>
type OccupiedEntry<'a>
= iterable_map::OccupiedEntry<'a, K, V, H>
where
Self: 'a;

Expand Down Expand Up @@ -243,27 +247,33 @@ where
V: BorshSerialize + BorshDeserialize,
H: ToKey,
{
type Keys<'a> = iterable_map::Keys<'a, K>
type Keys<'a>
= iterable_map::Keys<'a, K>
where
Self: 'a;

type Values<'a> = iterable_map::Values<'a, K, V, H>
type Values<'a>
= iterable_map::Values<'a, K, V, H>
where
Self: 'a;

type ValuesMut<'a> = iterable_map::ValuesMut<'a, K, V, H>
type ValuesMut<'a>
= iterable_map::ValuesMut<'a, K, V, H>
where
Self: 'a;

type Iter<'a> = iterable_map::Iter<'a, K, V, H>
type Iter<'a>
= iterable_map::Iter<'a, K, V, H>
where
Self: 'a;

type IterMut<'a> = iterable_map::IterMut<'a, K, V, H>
type IterMut<'a>
= iterable_map::IterMut<'a, K, V, H>
where
Self: 'a;

type Drain<'a> = iterable_map::Drain<'a, K, V, H>
type Drain<'a>
= iterable_map::Drain<'a, K, V, H>
where
Self: 'a;

Expand Down

0 comments on commit b621bd1

Please sign in to comment.