Replace fragment of unit test code with trim_trailing_new_line()

This commit is contained in:
Mike Fleetwood 2023-02-03 21:08:47 +00:00 committed by Curtis Gedak
parent ad434bb651
commit 62305ecb45
1 changed files with 1 additions and 6 deletions

View File

@ -314,12 +314,7 @@ const std::string SupportedFileSystemsTest::create_loopdev(const std::string& im
return "";
}
// Strip trailing New Line.
size_t len = output.length();
if (len > 0 && output[len-1] == '\n')
output.resize(len-1);
return output;
return Utils::trim_trailing_new_line(output);
}