diff options
author | Griffin Smith <grfn@gws.fyi> | 2020-09-07T17·01-0400 |
---|---|---|
committer | glittershark <grfn@gws.fyi> | 2020-09-14T21·38+0000 |
commit | 381ce8a66658ac9d02c44e96c860cd05bcb6a5f8 (patch) | |
tree | e475adb3f06e4bfa55af5ced0c16f9591734544d /third_party/nix/src/libutil/archive.hh | |
parent | 31b06516f315241c40ae0e6c3dd9dc7e641ea8dc (diff) |
refactor(tvix): Make static strings constexpr string_views r/1791
Make all static std::strings constexpr std::string_views, and replace concatenation with absl::StrCat where necessary. Technically all of these are constant, so they really don't need to be top-level statics - and since I'm trying to get rid of as much global state as possible in preparation for making the nix daemon properly multithreaded I figured I'd knock these out while I was at it. Change-Id: Ibd3ad9ef68f0a0eacb135541b39fdb13dae042e1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1939 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'third_party/nix/src/libutil/archive.hh')
-rw-r--r-- | third_party/nix/src/libutil/archive.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/nix/src/libutil/archive.hh b/third_party/nix/src/libutil/archive.hh index 194d31d078c4..396627878541 100644 --- a/third_party/nix/src/libutil/archive.hh +++ b/third_party/nix/src/libutil/archive.hh @@ -72,6 +72,6 @@ void restorePath(const Path& path, Source& source); /* Read a NAR from 'source' and write it to 'sink'. */ void copyNAR(Source& source, Sink& sink); -extern const std::string narVersionMagic1; +constexpr std::string_view kNarVersionMagic1 = "nix-archive-1"; } // namespace nix |