Generate already lint code from procedural generation (#5060)
This commit is contained in:
@ -43,7 +43,7 @@ pragma solidity ^0.8.20;
|
||||
`;
|
||||
/* eslint-enable max-len */
|
||||
|
||||
const defaultSet = () => `\
|
||||
const defaultSet = `\
|
||||
// To implement this library for multiple types with as little code
|
||||
// repetition as possible, we write it in terms of a generic Set type with
|
||||
// bytes32 values.
|
||||
@ -240,6 +240,11 @@ function values(${name} storage set) internal view returns (${type}[] memory) {
|
||||
module.exports = format(
|
||||
header.trimEnd(),
|
||||
'library EnumerableSet {',
|
||||
[defaultSet(), TYPES.map(details => customSet(details).trimEnd()).join('\n\n')],
|
||||
format(
|
||||
[].concat(
|
||||
defaultSet,
|
||||
TYPES.map(details => customSet(details)),
|
||||
),
|
||||
).trimEnd(),
|
||||
'}',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user