about summary refs log tree commit diff
path: root/users/Profpatsch/netencode/default.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-02-06T21·51+0100
committerProfpatsch <mail@profpatsch.de>2021-02-06T22·29+0000
commit3faf5b6f0927714d3bf1f3eaacd62189be7b6db2 (patch)
treea0e639b2951751bcb81218991b56c0bfe37d2bf9 /users/Profpatsch/netencode/default.nix
parent32a5312dd83bc24b990e43a655c70337f245b9a5 (diff)
feat(users/Profpatsch/netencode): decode from U r/2188
Since we don’t necessarily need to decode deeply, we can make the
decoders take a `U` instead of a `T`.

Change-Id: I9704a21edb3922d58411e6807d027d684b18d390
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2492
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/netencode/default.nix')
-rw-r--r--users/Profpatsch/netencode/default.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/users/Profpatsch/netencode/default.nix b/users/Profpatsch/netencode/default.nix
index 74dff2bc3a06..31cd822061b6 100644
--- a/users/Profpatsch/netencode/default.nix
+++ b/users/Profpatsch/netencode/default.nix
@@ -105,9 +105,10 @@ let
     use netencode::dec::{Record, ScalarAsBytes, Decoder, DecodeError};
 
     fn main() {
-        let t = netencode::t_from_stdin_or_die_user_error("record-splice-env");
+        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::<ScalarAsBytes>::dec(t) {
+        match Record::<ScalarAsBytes>::dec(u) {
             Ok(map) => {
                 exec_helpers::exec_into_args("record-splice-env", prog, map);
             },