1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 11:41:15 +02:00

Implement operator<< for Suggestions

That way there’s no need to explicitely convert it to a string when
printing it
This commit is contained in:
regnat 2022-03-07 10:04:57 +01:00
parent fd45d85b41
commit 313bbc07a8
3 changed files with 21 additions and 8 deletions

View file

@ -285,7 +285,7 @@ std::ostream & showErrorInfo(std::ostream & out, const ErrorInfo & einfo, bool s
auto suggestions = einfo.suggestions.trim();
if (! suggestions.suggestions.empty()){
oss << "Did you mean " <<
suggestions.trim().pretty_print() <<
suggestions.trim() <<
"?" << std::endl;
}