From 7d9c30ab3d9a9cb72cfcdec0ef060059edca7b1e Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sun, 7 Feb 2021 19:06:51 +0100 Subject: feat(users/Profpatsch/netencode): add `dec::RecordDot` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `dec::RecordDot` accesses a specific field of a netencode record. In order to implement this, either we’d have to introduce a type-level string, but in all honesty this kind of typelevel circlejerking never leads anywhere, so let’s change the trait to use `&self` after all. Usage is pretty much the same, except actually more like you’d expect. Change-Id: I5a7f1a3f587256c50df1b65c2969e5a7194bba70 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2494 Tested-by: BuildkiteCI Reviewed-by: Profpatsch --- users/Profpatsch/netencode/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/Profpatsch/netencode/default.nix') diff --git a/users/Profpatsch/netencode/default.nix b/users/Profpatsch/netencode/default.nix index 31cd822061..3b62c8aaac 100644 --- a/users/Profpatsch/netencode/default.nix +++ b/users/Profpatsch/netencode/default.nix @@ -108,7 +108,7 @@ let let mut buf = vec![]; let u = netencode::u_from_stdin_or_die_user_error("record-splice-env", &mut buf); let (_, prog) = exec_helpers::args_for_exec("record-splice-env", 0); - match Record::::dec(u) { + match Record(ScalarAsBytes).dec(u) { Ok(map) => { exec_helpers::exec_into_args("record-splice-env", prog, map); }, -- cgit 1.4.1