diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2018-12-25T19·35+0300 |
---|---|---|
committer | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2018-12-25T19·38+0300 |
commit | 93c9ba3e783a0250786fe7f305551cee6f0ea3ef (patch) | |
tree | f1c4e4e21a736aa052ce0136863c8f84a86518e7 /src/nix/repl.cc | |
parent | ff342fc0c2be662dd9791ff32b4d6d63e35aa2e9 (diff) |
remove some dead code in nix/repl.cc
Fixes a static analyzer warning: Expression 'isDrv' is always false. Fixes: 3beb6f6e7 ('Show derivations more concisely')
Diffstat (limited to 'src/nix/repl.cc')
-rw-r--r-- | src/nix/repl.cc | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc index d4806d74adb8..dd3d9ed97495 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -643,30 +643,13 @@ std::ostream & NixRepl::printValue(std::ostream & str, Value & v, unsigned int m for (auto & i : *v.attrs) sorted[i.name] = i.value; - /* If this is a derivation, then don't show the - self-references ("all", "out", etc.). */ - StringSet hidden; - if (isDrv) { - hidden.insert("all"); - Bindings::iterator i = v.attrs->find(state.sOutputs); - if (i == v.attrs->end()) - hidden.insert("out"); - else { - state.forceList(*i->value); - for (unsigned int j = 0; j < i->value->listSize(); ++j) - hidden.insert(state.forceStringNoCtx(*i->value->listElems()[j])); - } - } - for (auto & i : sorted) { if (isVarName(i.first)) str << i.first; else printStringValue(str, i.first.c_str()); str << " = "; - if (hidden.find(i.first) != hidden.end()) - str << "«...»"; - else if (seen.find(i.second) != seen.end()) + if (seen.find(i.second) != seen.end()) str << "«repeated»"; else try { |