@@ -414,11 +414,10 @@ template <std::size_t N>
414414std::array<uint8_t , N> from_hex_to_array (std::string x) {
415415 std::string as_hex = oxenc::from_hex (x);
416416 if (as_hex.size () != N) {
417- throw std::invalid_argument (
418- fmt::format (
419- " from_hex_to_array: Decoded hex size mismatch: expected {}, got {}" ,
420- N,
421- as_hex.size ()));
417+ throw std::invalid_argument (fmt::format (
418+ " from_hex_to_array: Decoded hex size mismatch: expected {}, got {}" ,
419+ N,
420+ as_hex.size ()));
422421 }
423422
424423 std::array<uint8_t , N> result;
@@ -434,15 +433,16 @@ std::vector<unsigned char> from_base64_to_vector(std::string_view x);
434433// Concept to match containers with a size() method
435434template <typename T>
436435concept HasSize = requires (T t) {
437- {t.size ()}->std ::convertible_to<size_t >;
436+ {
437+ t.size ()
438+ } -> std::convertible_to<size_t >;
438439};
439440
440441template <HasSize T>
441442void assert_length (const T& x, size_t n, std::string_view base_identifier) {
442443 if (x.size () != n) {
443- throw std::invalid_argument (
444- fmt::format (
445- " assert_length: expected {}, got {} for {}" , n, x.size (), base_identifier));
444+ throw std::invalid_argument (fmt::format (
445+ " assert_length: expected {}, got {} for {}" , n, x.size (), base_identifier));
446446 }
447447}
448448
0 commit comments