mirror of
https://github.com/NixOS/nix
synced 2025-06-28 09:31:16 +02:00
Format
Co-authored-by: Eelco Dolstra <edolstra@gmail.com> Co-authored-by: John Ericson <git@JohnEricson.me>
This commit is contained in:
parent
4e0804c920
commit
9c74df5bb4
2 changed files with 5 additions and 3 deletions
|
@ -3,7 +3,8 @@
|
|||
namespace nix {
|
||||
|
||||
std::ostream &
|
||||
printLiteral(std::ostream & str, const std::string_view string) {
|
||||
printLiteral(std::ostream & str, const std::string_view string)
|
||||
{
|
||||
str << "\"";
|
||||
for (auto i = string.begin(); i != string.end(); ++i) {
|
||||
if (*i == '\"' || *i == '\\') str << "\\" << *i;
|
||||
|
@ -18,7 +19,8 @@ printLiteral(std::ostream & str, const std::string_view string) {
|
|||
}
|
||||
|
||||
std::ostream &
|
||||
printLiteral(std::ostream & str, bool boolean) {
|
||||
printLiteral(std::ostream & str, bool boolean)
|
||||
{
|
||||
str << (boolean ? "true" : "false");
|
||||
return str;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue