treewide: Switch to std::format
Reduce our dependence on fmtlib.
Change-Id: I1cc9b372aa366ae26d846470c8ab9d1d52e8db70
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/fd/atomic.cpp b/src/fd/atomic.cpp
index ce9dff2..5299789 100644
--- a/src/fd/atomic.cpp
+++ b/src/fd/atomic.cpp
@@ -1,5 +1,5 @@
-#include <fmt/format.h>
#include <sys/stat.h>
+#include <unistd.h>
#include <stdplus/fd/atomic.hpp>
#include <stdplus/fd/managed.hpp>
@@ -7,6 +7,7 @@
#include <cstdlib>
#include <filesystem>
+#include <format>
#include <system_error>
#include <utility>
@@ -19,7 +20,7 @@
{
auto name = filename.filename();
auto path = filename.parent_path() /
- fmt::format(".{}.XXXXXX", name.native());
+ std::format(".{}.XXXXXX", name.native());
return path.native();
}
@@ -30,7 +31,7 @@
umask(old);
return CHECK_ERRNO(fd, [&](int error) {
throw std::system_error(error, std::generic_category(),
- fmt::format("mkstemp({})", tmpl));
+ std::format("mkstemp({})", tmpl));
});
}