diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-10 16:20:01 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-10 16:20:01 +0000 |
commit | 938650700fafe76e3755982d670855fed3db35c6 (patch) | |
tree | 7a6ac217f87cad07bb963ec658bd60625b868466 /src/nix-store/graphml.cc | |
parent | 195daa82995b43b3cbd552735a678afb85f4ae28 (diff) | |
parent | 8ba089597fa19bfd49ba5f22a5e821740ca4eb5d (diff) |
Merge branch 'path-info' into ca-drv-exotic
Diffstat (limited to 'src/nix-store/graphml.cc')
-rw-r--r-- | src/nix-store/graphml.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix-store/graphml.cc b/src/nix-store/graphml.cc index 1cd974e41..d2eebca7a 100644 --- a/src/nix-store/graphml.cc +++ b/src/nix-store/graphml.cc @@ -19,20 +19,20 @@ static inline std::string_view xmlQuote(std::string_view s) } -static string symbolicName(const std::string & p) +static std::string symbolicName(std::string_view p) { - return string(p, p.find('-') + 1); + return std::string(p.substr(0, p.find('-') + 1)); } -static string makeEdge(std::string_view src, std::string_view dst) +static std::string makeEdge(std::string_view src, std::string_view dst) { return fmt(" <edge source=\"%1%\" target=\"%2%\"/>\n", xmlQuote(src), xmlQuote(dst)); } -static string makeNode(const ValidPathInfo & info) +static std::string makeNode(const ValidPathInfo & info) { return fmt( " <node id=\"%1%\">\n" |