mirror of
https://github.com/NixOS/nix.git
synced 2025-02-19 18:32:36 +00:00
Refactor: rename ValuePrinter::totalAttrsPrinted
Make it more distinct from the attrs printed of any specific attrset.
This commit is contained in:
parent
9b88bf8adf
commit
ce1dc87711
@ -163,7 +163,7 @@ private:
|
||||
EvalState & state;
|
||||
PrintOptions options;
|
||||
std::optional<ValuesSeen> seen;
|
||||
size_t attrsPrinted = 0;
|
||||
size_t totalAttrsPrinted = 0;
|
||||
size_t listItemsPrinted = 0;
|
||||
std::string indent;
|
||||
|
||||
@ -350,7 +350,7 @@ private:
|
||||
for (auto & i : sorted) {
|
||||
printSpace(prettyPrint);
|
||||
|
||||
if (attrsPrinted >= options.maxAttrs) {
|
||||
if (totalAttrsPrinted >= options.maxAttrs) {
|
||||
printElided(sorted.size() - currentAttrsPrinted, "attribute", "attributes");
|
||||
break;
|
||||
}
|
||||
@ -359,7 +359,7 @@ private:
|
||||
output << " = ";
|
||||
print(*i.second, depth + 1);
|
||||
output << ";";
|
||||
attrsPrinted++;
|
||||
totalAttrsPrinted++;
|
||||
currentAttrsPrinted++;
|
||||
}
|
||||
|
||||
@ -591,7 +591,7 @@ public:
|
||||
|
||||
void print(Value & v)
|
||||
{
|
||||
attrsPrinted = 0;
|
||||
totalAttrsPrinted = 0;
|
||||
listItemsPrinted = 0;
|
||||
indent.clear();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user