From 0f7b60df45012a585487aa9fe860d761e96a2496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Sun, 28 Jan 2024 21:32:18 +0100 Subject: [PATCH] Improve `nano::util::join` --- nano/lib/utility.hpp | 2 +- nano/secure/vote.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nano/lib/utility.hpp b/nano/lib/utility.hpp index 61beefee..97d8bd3a 100644 --- a/nano/lib/utility.hpp +++ b/nano/lib/utility.hpp @@ -232,7 +232,7 @@ std::string join (InputIt first, InputIt last, std::string_view delimiter, Func } else { - ss << delimiter << " "; + ss << delimiter; } ss << transform (*first); ++first; diff --git a/nano/secure/vote.cpp b/nano/secure/vote.cpp index 208aca4d..9ffeabe0 100644 --- a/nano/secure/vote.cpp +++ b/nano/secure/vote.cpp @@ -165,7 +165,7 @@ std::string nano::vote::to_json () const std::string nano::vote::hashes_string () const { - return nano::util::join (hashes, ",", [] (auto const & hash) { + return nano::util::join (hashes, ", ", [] (auto const & hash) { return hash.to_string (); }); }