tvl-depot/tvix/nix-compat
Florian Klink 2beabe968c refactor(nix-compat/store_path): make StorePath generic on S
Similar to how cl/12253 already did this for `Signature`, we apply the
same logic to `StorePath`.

`StorePathRef<'a>'` is now a `StorePath<&'a str>`, and there's less
redundant code for the two different implementation.

`.as_ref()` returns a `StorePathRef<'_>`, `.to_owned()` gives a
`StorePath<String>` (for now).

I briefly thought about only publicly exporting `StorePath<String>`
as `StorePath`, but the diff is not too large and this will make it
easier to gradually introduce more flexibility in which store paths to
accept.

Also, remove some silliness in `StorePath::from_absolute_path_full`,
which now doesn't allocate anymore.

Change-Id: Ife8843857a1a0a3a99177ca997649fd45b8198e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12258
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-08-20 15:14:27 +00:00
..
benches feat(tvix): Jemalloc -> MiMalloc 2024-08-08 08:06:23 +00:00
src refactor(nix-compat/store_path): make StorePath generic on S 2024-08-20 15:14:27 +00:00
testdata feat(nix-compat/nixcpp): init nix.conf config parsing 2024-06-28 12:23:03 +00:00
build.rs fix(tvix): make rstest pick up new test case files 2024-06-05 17:52:17 +00:00
Cargo.toml feat(nix-compat/narinfo/signature): generalize name field 2024-08-19 19:46:34 +00:00
default.nix chore(tvix): Retain original passthru in Rust builds 2024-08-15 23:37:00 +00:00