1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-20 17:29:36 +01:00

Remove FormatOrString and remaining uses of format()

This commit is contained in:
Eelco Dolstra 2023-03-02 15:44:19 +01:00
parent b9370fd7a0
commit 29abc8e764
40 changed files with 102 additions and 125 deletions

View file

@ -125,11 +125,11 @@ public:
return printBuildLogs;
}
void log(Verbosity lvl, const FormatOrString & fs) override
void log(Verbosity lvl, std::string_view s) override
{
if (lvl > verbosity) return;
auto state(state_.lock());
log(*state, lvl, fs.s);
log(*state, lvl, s);
}
void logEI(const ErrorInfo & ei) override
@ -142,7 +142,7 @@ public:
log(*state, ei.level, oss.str());
}
void log(State & state, Verbosity lvl, const std::string & s)
void log(State & state, Verbosity lvl, std::string_view s)
{
if (state.active) {
writeToStderr("\r\e[K" + filterANSIEscapes(s, !isTTY) + ANSI_NORMAL "\n");