diff options
Diffstat (limited to 'tvix/nix-compat/src/derivation')
-rw-r--r-- | tvix/nix-compat/src/derivation/parser.rs | 6 | ||||
-rw-r--r-- | tvix/nix-compat/src/derivation/write.rs | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/tvix/nix-compat/src/derivation/parser.rs b/tvix/nix-compat/src/derivation/parser.rs index 8e9804157da3..a94ed2281a86 100644 --- a/tvix/nix-compat/src/derivation/parser.rs +++ b/tvix/nix-compat/src/derivation/parser.rs @@ -203,11 +203,7 @@ fn string_to_store_path<'a, 'i, S>( path_str: &'a str, ) -> Result<StorePath<S>, nom::Err<NomError<&'i [u8]>>> where - S: std::cmp::Eq - + std::fmt::Display - + std::clone::Clone - + std::ops::Deref<Target = str> - + std::convert::From<&'a str>, + S: std::clone::Clone + AsRef<str> + std::convert::From<&'a str>, { let path = StorePath::from_absolute_path(path_str.as_bytes()).map_err(|e: store_path::Error| { diff --git a/tvix/nix-compat/src/derivation/write.rs b/tvix/nix-compat/src/derivation/write.rs index 42dadcd76064..a8b43fad4cc6 100644 --- a/tvix/nix-compat/src/derivation/write.rs +++ b/tvix/nix-compat/src/derivation/write.rs @@ -36,14 +36,14 @@ pub(crate) trait AtermWriteable { impl<S> AtermWriteable for StorePath<S> where - S: std::cmp::Eq + std::ops::Deref<Target = str>, + S: AsRef<str>, { fn aterm_write(&self, writer: &mut impl Write) -> std::io::Result<()> { write_char(writer, QUOTE)?; writer.write_all(STORE_DIR_WITH_SLASH.as_bytes())?; writer.write_all(nixbase32::encode(self.digest()).as_bytes())?; write_char(writer, '-')?; - writer.write_all(self.name().as_bytes())?; + writer.write_all(self.name().as_ref().as_bytes())?; write_char(writer, QUOTE)?; Ok(()) } |