diff options
author | Florian Klink <flokli@flokli.de> | 2023-12-09T10·48+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-12-09T12·58+0000 |
commit | 0907420600ba0f9270065dd83e81fb8f56dfda71 (patch) | |
tree | 4bacffb7e7b9b1352f9def180f4a990f395610ac /tvix/nix-compat/src/derivation/output.rs | |
parent | 5855959d879a6f57ff683f752fdc4d0c47427382 (diff) |
refactor(nix-compat/store_path): from_absolute_path to StorePathRef r/7132
The only non-test usage was only checking for the error case, and we can still convert this to an owned StorePath by calling to_owned() on StorePathRef. Change-Id: I9f67a759e580c9c429c96896bcdd295392aa5a2a Reviewed-on: https://cl.tvl.fyi/c/depot/+/10225 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/nix-compat/src/derivation/output.rs')
-rw-r--r-- | tvix/nix-compat/src/derivation/output.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/nix-compat/src/derivation/output.rs b/tvix/nix-compat/src/derivation/output.rs index c13f94859dc1..b7fa1ac379b0 100644 --- a/tvix/nix-compat/src/derivation/output.rs +++ b/tvix/nix-compat/src/derivation/output.rs @@ -1,6 +1,6 @@ use crate::derivation::OutputError; use crate::nixhash::CAHash; -use crate::store_path::StorePath; +use crate::store_path::StorePathRef; use serde::{Deserialize, Serialize}; use serde_json::Map; @@ -51,7 +51,7 @@ impl Output { } if validate_output_paths { - if let Err(e) = StorePath::from_absolute_path(self.path.as_bytes()) { + if let Err(e) = StorePathRef::from_absolute_path(self.path.as_bytes()) { return Err(OutputError::InvalidOutputPath(self.path.to_string(), e)); } } |