diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2023-04-15 20:56:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-15 20:56:51 +0200 |
commit | 9c74df5bb4f41c938a4f6942492f5ce92b0ef371 (patch) | |
tree | ca2ce7a122e3b139cbee7532e654844bac2b6990 /src | |
parent | 4e0804c920558575a4b3486df1e595445bf67555 (diff) |
Format
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
Co-authored-by: John Ericson <git@JohnEricson.me>
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/value/print.cc | 6 | ||||
-rw-r--r-- | src/libstore/derivations.cc | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/libexpr/value/print.cc b/src/libexpr/value/print.cc index cf97def46..c67ff9f87 100644 --- a/src/libexpr/value/print.cc +++ b/src/libexpr/value/print.cc @@ -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; } diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index 9948862e5..7eb5cd275 100644 --- a/src/libstore/derivations.cc +++ b/src/libstore/derivations.cc @@ -314,7 +314,7 @@ Derivation parseDerivation(const Store & store, std::string && s, std::string_vi /** - * Print a derivation string literal to an std::string. + * Print a derivation string literal to an `std::string`. * * This syntax does not generalize to the expression language, which needs to * escape `$`. |