about summary refs log tree commit diff
path: root/tvix/eval/src/value/string.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-08-09T13·52+0300
committertazjin <tazjin@tvl.su>2022-08-13T11·50+0000
commite24248df3bba6c4df2028a7eb9e68660b1d3b4e7 (patch)
tree658db19ee9036e188f02b6b89b9514ffcfdffe8d /tvix/eval/src/value/string.rs
parent865717a8dbef9f89f2c32d0c86d970f3c21dbd9f (diff)
feat(tvix/value): add some necessary helpers for strings r/4425
Deriving Ord/Eq is required for the ordered BTreeMaps. Once interning
is implemented this will require some extra magic for the sort order,
but that's fine.

Change-Id: I0c654648eb3609a4a01d84868c25f43a4d35bc2e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6089
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/value/string.rs')
-rw-r--r--tvix/eval/src/value/string.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/value/string.rs b/tvix/eval/src/value/string.rs
index 7e6f5ecf3bd3..531bcf547b0b 100644
--- a/tvix/eval/src/value/string.rs
+++ b/tvix/eval/src/value/string.rs
@@ -3,8 +3,8 @@ use std::fmt::Display;
 /// This module implements Nix language strings and their different
 /// backing implementations.
 
-#[derive(Clone, Debug, Hash, PartialEq)]
-pub struct NixString(String);
+#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
+pub struct NixString(pub String);
 
 impl Display for NixString {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {