Skip to content

Commit a97cb6b

Browse files
committed
chore: lint source
1 parent bf910a7 commit a97cb6b

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

include/utilities.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -399,11 +399,10 @@ template <std::size_t N>
399399
std::array<uint8_t, N> from_hex_to_array(std::string x) {
400400
std::string as_hex = oxenc::from_hex(x);
401401
if (as_hex.size() != N) {
402-
throw std::invalid_argument(
403-
fmt::format(
404-
"from_hex_to_array: Decoded hex size mismatch: expected {}, got {}",
405-
N,
406-
as_hex.size()));
402+
throw std::invalid_argument(fmt::format(
403+
"from_hex_to_array: Decoded hex size mismatch: expected {}, got {}",
404+
N,
405+
as_hex.size()));
407406
}
408407

409408
std::array<uint8_t, N> result;
@@ -419,15 +418,16 @@ std::vector<unsigned char> from_base64_to_vector(std::string_view x);
419418
// Concept to match containers with a size() method
420419
template <typename T>
421420
concept HasSize = requires(T t) {
422-
{t.size()}->std::convertible_to<size_t>;
421+
{
422+
t.size()
423+
} -> std::convertible_to<size_t>;
423424
};
424425

425426
template <HasSize T>
426427
void assert_length(const T& x, size_t n, std::string_view base_identifier) {
427428
if (x.size() != n) {
428-
throw std::invalid_argument(
429-
fmt::format(
430-
"assert_length: expected {}, got {} for {}", n, x.size(), base_identifier));
429+
throw std::invalid_argument(fmt::format(
430+
"assert_length: expected {}, got {} for {}", n, x.size(), base_identifier));
431431
}
432432
}
433433

src/user_config.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ Napi::Value UserConfigWrapper::generateProMasterKey(const Napi::CallbackInfo& in
281281
assert_length(ed25519_seed_cpp_hex, 64, "generateProMasterKey");
282282
auto converted = from_hex_to_vector(ed25519_seed_cpp_hex);
283283

284-
auto pro_master_key_hex =
285-
session::ed25519::ed25519_pro_privkey_for_ed25519_seed(converted);
284+
auto pro_master_key_hex = session::ed25519::ed25519_pro_privkey_for_ed25519_seed(converted);
286285
auto obj = Napi::Object::New(info.Env());
287286
obj["proMasterKey"] = toJs(info.Env(), pro_master_key_hex);
288287

0 commit comments

Comments
 (0)