diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-03-02 15:44:19 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2023-03-02 15:57:54 +0100 |
commit | 29abc8e7647cd9ec6ef5a1df3fcb1dcf4a4495a2 (patch) | |
tree | 0461f565859916470a054f9db68df280090d4dc1 /src/libmain | |
parent | b9370fd7a040558cc8c7d5db109fdd3e407ff409 (diff) |
Remove FormatOrString and remaining uses of format()
Diffstat (limited to 'src/libmain')
-rw-r--r-- | src/libmain/progress-bar.cc | 6 | ||||
-rw-r--r-- | src/libmain/shared.cc | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libmain/progress-bar.cc b/src/libmain/progress-bar.cc index e9205a5e5..024259584 100644 --- a/src/libmain/progress-bar.cc +++ b/src/libmain/progress-bar.cc @@ -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"); diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index d4871a8e2..27552d5bf 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -347,7 +347,7 @@ void parseCmdLine(const std::string & programName, const Strings & args, void printVersion(const std::string & programName) { - std::cout << format("%1% (Nix) %2%") % programName % nixVersion << std::endl; + std::cout << fmt("%1% (Nix) %2%", programName, nixVersion) << std::endl; if (verbosity > lvlInfo) { Strings cfg; #if HAVE_BOEHMGC |