Skip to content

Commit 5886d3e

Browse files
committed
chore: add format so windows can build
1 parent 8ec5bce commit 5886d3e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

include/utilities.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22

3+
#include <fmt/format.h>
34
#include <napi.h>
45

56
#include <optional>
@@ -382,7 +383,7 @@ template <std::size_t N>
382383
std::array<uint8_t, N> from_hex_to_array(std::string x) {
383384
std::string as_hex = oxenc::from_hex(x);
384385
if (as_hex.size() != N) {
385-
throw std::invalid_argument(std::format(
386+
throw std::invalid_argument(fmt::format(
386387
"from_hex_to_array: Decoded hex size mismatch: expected {}, got {}",
387388
N,
388389
as_hex.size()));
@@ -409,7 +410,7 @@ concept HasSize = requires(T t) {
409410
template <HasSize T>
410411
void assert_length(const T& x, size_t n, std::string_view base_identifier) {
411412
if (x.size() != n) {
412-
throw std::invalid_argument(std::format(
413+
throw std::invalid_argument(fmt::format(
413414
"assert_length: expected {}, got {} for {}", n, x.size(), base_identifier));
414415
}
415416
}

0 commit comments

Comments
 (0)