From 977fa4df8103f17ac660f462520a5d1840f051e7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 7 May 2021 20:48:20 +0200 Subject: [PATCH] Utilities: Convert StringBuilder::appendf() => AK::Format --- Userland/Utilities/w.cpp | 2 +- Userland/Utilities/watch.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Utilities/w.cpp b/Userland/Utilities/w.cpp index 14158ccf7c..d07d75bedc 100644 --- a/Userland/Utilities/w.cpp +++ b/Userland/Utilities/w.cpp @@ -88,7 +88,7 @@ int main() if (stat(tty.characters(), &st) == 0) { auto idle_time = now - st.st_mtime; if (idle_time >= 0) { - builder.appendf("%" PRIi64 "s", idle_time); + builder.appendff("{}s", idle_time); idle_string = builder.to_string(); } } diff --git a/Userland/Utilities/watch.cpp b/Userland/Utilities/watch.cpp index 0b21c59231..50e52c6b87 100644 --- a/Userland/Utilities/watch.cpp +++ b/Userland/Utilities/watch.cpp @@ -26,7 +26,7 @@ static String build_header_string(const Vector& command, const stru { StringBuilder builder; builder.appendff("Every {}", interval.tv_sec); - builder.appendf(".%ds: \x1b[1m", interval.tv_usec / 100000); + builder.appendff(".{}s: \x1b[1m", interval.tv_usec / 100000); builder.join(' ', command); builder.append("\x1b[0m"); return builder.build();