Use named arguments in mapping types (#4433)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
Ernesto García
2023-08-08 19:48:56 -06:00
committed by GitHub
parent 48b860124c
commit cb0ffefe2f
29 changed files with 48 additions and 60 deletions

View File

@ -10,7 +10,7 @@ abstract contract Nonces {
*/
error InvalidAccountNonce(address account, uint256 currentNonce);
mapping(address => uint256) private _nonces;
mapping(address account => uint256) private _nonces;
/**
* @dev Returns an the next unused nonce for an address.

View File

@ -17,7 +17,7 @@ pragma solidity ^0.8.20;
*/
library BitMaps {
struct BitMap {
mapping(uint256 => uint256) _data;
mapping(uint256 bucket => uint256) _data;
}
/**

View File

@ -45,7 +45,7 @@ library DoubleEndedQueue {
struct Bytes32Deque {
uint128 _begin;
uint128 _end;
mapping(uint128 => bytes32) _data;
mapping(uint128 index => bytes32) _data;
}
/**

View File

@ -65,7 +65,7 @@ library EnumerableMap {
struct Bytes32ToBytes32Map {
// Storage of keys
EnumerableSet.Bytes32Set _keys;
mapping(bytes32 => bytes32) _values;
mapping(bytes32 key => bytes32) _values;
}
/**

View File

@ -53,7 +53,7 @@ library EnumerableSet {
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping(bytes32 => uint256) _indexes;
mapping(bytes32 value => uint256) _indexes;
}
/**