1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00

Slight optimization

This commit is contained in:
Eelco Dolstra 2019-04-29 22:23:54 +02:00
parent abbbad5679
commit 54e1ac6102

View file

@ -98,8 +98,11 @@ struct CmdListTarballs : MixJSON, InstallablesCommand
} catch (EvalError & e) {
}
} else {
for (auto & attr : *v->attrs)
std::unordered_set<Value *> vs;
for (auto & attr : *v->attrs) {
if (!vs.insert(attr.value).second) continue;
findDerivations(attr.value);
}
}
}
};