use std::format
Remove use of fmt and replace with the std::format version.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib89de0b3d10866276964db7b3fa8d97991df410d
diff --git a/tools/p2a.cpp b/tools/p2a.cpp
index 3cd641a..50e891d 100644
--- a/tools/p2a.cpp
+++ b/tools/p2a.cpp
@@ -21,13 +21,12 @@
#include "pci.hpp"
#include "tool_errors.hpp"
-#include <fmt/format.h>
-
#include <ipmiblob/blob_errors.hpp>
#include <stdplus/handle/managed.hpp>
#include <cstdint>
#include <cstring>
+#include <format>
#include <memory>
#include <span>
#include <string>
@@ -90,7 +89,7 @@
{
(void)inputFd.release();
throw internal::errnoException(
- fmt::format("Error opening file '{}'", input));
+ std::format("Error opening file '{}'", input));
}
fileSize = sys->getSize(input.c_str());
diff --git a/tools/pci.cpp b/tools/pci.cpp
index 8403771..de3fb51 100644
--- a/tools/pci.cpp
+++ b/tools/pci.cpp
@@ -25,11 +25,10 @@
#include "helper.hpp"
-#include <fmt/format.h>
-
#include <stdplus/handle/managed.hpp>
#include <cstring>
+#include <format>
#include <span>
#include <system_error>
@@ -74,7 +73,7 @@
if (!dev)
{
- throw NotFoundException(fmt::format(
+ throw NotFoundException(std::format(
"PCI device {:#04x}:{:#04x}", match->vendor_id, match->device_id));
}
@@ -110,7 +109,7 @@
if (data.size() > dataLength)
{
throw ToolException(
- fmt::format("Write of {} bytes exceeds maximum of {}", data.size(),
+ std::format("Write of {} bytes exceeds maximum of {}", data.size(),
dataLength));
}