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