summaryrefslogtreecommitdiffstatshomepage
path: root/src/handle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/handle.cpp')
-rw-r--r--src/handle.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/handle.cpp b/src/handle.cpp
index 2260aa3..916b8ae 100644
--- a/src/handle.cpp
+++ b/src/handle.cpp
@@ -13,7 +13,6 @@
#include <cassert>
#include <cstddef>
#include <limits>
-#include <sstream>
#include <stdexcept>
#include <utility>
@@ -21,9 +20,8 @@ namespace winapi {
namespace {
std::runtime_error write_file_incomplete(std::size_t expected, std::size_t actual) {
- std::ostringstream oss;
- oss << "WriteFile could only write " << actual << " bytes instead of " << expected;
- return std::runtime_error{oss.str()};
+ return std::runtime_error{
+ std::format("WriteFile could only write {} bytes instead of {}", actual, expected)};
}
bool is_std_handle(HANDLE handle) {