fix format

This commit is contained in:
Jörg Thalheim 2023-12-10 15:44:15 +01:00 committed by mergify[bot]
parent a03f039a56
commit 3be8c48f54
2 changed files with 7 additions and 6 deletions

View file

@ -6,9 +6,8 @@
#include <nix/value-to-json.hh>
#include <nix/derivations.hh>
static bool queryIsCached(nix::Store &store,
std::map<std::string, std::string> &outputs) {
std::map<std::string, std::string> &outputs) {
uint64_t downloadSize, narSize;
nix::StorePathSet willBuild, willSubstitute, unknown;
@ -23,7 +22,8 @@ static bool queryIsCached(nix::Store &store,
}
/* The fields of a derivation that are printed in json form */
Drv::Drv(std::string &attrPath, nix::EvalState &state, nix::DrvInfo &drvInfo, MyArgs &args) {
Drv::Drv(std::string &attrPath, nix::EvalState &state, nix::DrvInfo &drvInfo,
MyArgs &args) {
auto localStore = state.store.dynamic_pointer_cast<nix::LocalFSStore>();
@ -58,8 +58,9 @@ Drv::Drv(std::string &attrPath, nix::EvalState &state, nix::DrvInfo &drvInfo, My
meta = meta_;
}
if (args.checkCacheStatus) {
cacheStatus = queryIsCached(*localStore, outputs) ? Drv::CacheStatus::Cached
: Drv::CacheStatus::Uncached;
cacheStatus = queryIsCached(*localStore, outputs)
? Drv::CacheStatus::Cached
: Drv::CacheStatus::Uncached;
} else {
cacheStatus = Drv::CacheStatus::Unknown;
}

View file

@ -88,6 +88,6 @@ MyArgs::MyArgs() : MixCommonArgs("nix-eval-jobs") {
expectArg("expr", &releaseExpr);
}
void MyArgs::parseArgs(char** argv, int argc) {
void MyArgs::parseArgs(char **argv, int argc) {
parseCmdline(nix::argvToStrings(argc, argv), 0);
}