diff options
Diffstat (limited to 'tvix/eval/src/value/string.rs')
-rw-r--r-- | tvix/eval/src/value/string.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tvix/eval/src/value/string.rs b/tvix/eval/src/value/string.rs index c21f2c4e8395..876b1abe6b40 100644 --- a/tvix/eval/src/value/string.rs +++ b/tvix/eval/src/value/string.rs @@ -3,6 +3,7 @@ use smol_str::SmolStr; use std::hash::Hash; use std::ops::Deref; +use std::path::Path; use std::{borrow::Cow, fmt::Display, str::Chars}; #[derive(Clone, Debug)] @@ -185,6 +186,12 @@ impl AsRef<str> for NixString { } } +impl AsRef<Path> for NixString { + fn as_ref(&self) -> &Path { + self.as_str().as_ref() + } +} + impl Deref for NixString { type Target = str; |