diff --git a/include/multipass/utils.h b/include/multipass/utils.h index cdf2f5df6d6..bcd3a494d13 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