fix(tvix/eval): fix several string escapings

These were missing an additional level of escaping, silly oversight
caught by an upstream test.

Change-Id: I0312084475e4b88c83945614e9aa5b34c6bc3ec2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6232
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2022-08-17 00:51:56 +03:00 committed by tazjin
parent 813fb98470
commit 5522ddfbf5

View file

@ -92,9 +92,11 @@ impl NixString {
fn nix_escape_char(ch: char) -> Option<&'static str> {
match ch {
'\\' => Some("\\"),
'"' => Some("\\"),
'\\' => Some("\\\\"),
'"' => Some("\\\""),
'\n' => Some("\\n"),
'\t' => Some("\\t"),
'\r' => Some("\\r"),
_ => None,
}
}