From d7703bf289d06733ba006126fcce868b6db3e127 Mon Sep 17 00:00:00 2001 From: Ricardo Abreu Date: Mon, 30 Oct 2023 14:15:37 +0200 Subject: [PATCH] [utils] Fix ignored custom filter in trim --- include/multipass/utils.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/multipass/utils.h b/include/multipass/utils.h index bb4ac08cedf..c07896aa2a5 100644 --- a/include/multipass/utils.h +++ b/include/multipass/utils.h @@ -277,7 +277,8 @@ Str&& multipass::utils::trim_end(Str&& s) template Str&& multipass::utils::trim(Str&& s, Filter&& filter) { - return trim_begin(trim_end(std::forward(s), std::forward(filter))); + auto&& ret = trim_end(std::forward(s), filter); + return trim_begin(std::forward(ret), std::forward(filter)); } template