mirror of
https://github.com/NixOS/nix
synced 2024-09-19 10:50:24 -04: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;
|
EvalState & state;
|
||||||
PrintOptions options;
|
PrintOptions options;
|
||||||
std::optional<ValuesSeen> seen;
|
std::optional<ValuesSeen> seen;
|
||||||
size_t attrsPrinted = 0;
|
size_t totalAttrsPrinted = 0;
|
||||||
size_t listItemsPrinted = 0;
|
size_t listItemsPrinted = 0;
|
||||||
std::string indent;
|
std::string indent;
|
||||||
|
|
||||||
|
@ -350,7 +350,7 @@ private:
|
||||||
for (auto & i : sorted) {
|
for (auto & i : sorted) {
|
||||||
printSpace(prettyPrint);
|
printSpace(prettyPrint);
|
||||||
|
|
||||||
if (attrsPrinted >= options.maxAttrs) {
|
if (totalAttrsPrinted >= options.maxAttrs) {
|
||||||
printElided(sorted.size() - currentAttrsPrinted, "attribute", "attributes");
|
printElided(sorted.size() - currentAttrsPrinted, "attribute", "attributes");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -359,7 +359,7 @@ private:
|
||||||
output << " = ";
|
output << " = ";
|
||||||
print(*i.second, depth + 1);
|
print(*i.second, depth + 1);
|
||||||
output << ";";
|
output << ";";
|
||||||
attrsPrinted++;
|
totalAttrsPrinted++;
|
||||||
currentAttrsPrinted++;
|
currentAttrsPrinted++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -591,7 +591,7 @@ public:
|
||||||
|
|
||||||
void print(Value & v)
|
void print(Value & v)
|
||||||
{
|
{
|
||||||
attrsPrinted = 0;
|
totalAttrsPrinted = 0;
|
||||||
listItemsPrinted = 0;
|
listItemsPrinted = 0;
|
||||||
indent.clear();
|
indent.clear();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue