From 6baa7a4398fb90ab52a482826335d36df8189e1d 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 cdf2f5df6d..bcd3a494d1 100644 --- a/include/multipass/utils.h +++ b/include/multipass/utils.h @@ -280,7 +280,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