1. Oliver Gu
  2. ibx

Commits

Oliver Gu  committed 21a6c6d

Pickler construction is not delayed in simulation server

  • Participants
  • Parent commits 6daf567
  • Branches master

Comments (0)

Files changed (1)

File lib_test/simulation_server.ml

View file
           data     : string;
         } with fields, sexp
 
-      let pickler = lazy (
+      let pickler =
         Pickler.create ~name:"Simulation_server.Server_message"
           Pickler.Spec.(
             wrap (
                 ~query_id:(fields_value (skipped_if_none Query_id.val_type))
                 ~data:(fields_value tws_data))
               (fun { tag; version; query_id; data } ->
-                `Args $ tag $ version $ query_id $ data)))
+                `Args $ tag $ version $ query_id $ data))
     end
 
     module Server_header = struct
-      let pickler = lazy (
+      let pickler =
         Pickler.create ~name:"Simulation_server.Server_header"
-          Pickler.Spec.(value (required int) ++ value (required time)))
+          Pickler.Spec.(value (required int) ++ value (required time))
     end
 
     type t =
 
     let to_tws = function
       | Server_header (version, conn_time) ->
-        Pickler.run (Lazy.force Server_header.pickler) (version, conn_time)
+        Pickler.run Server_header.pickler (version, conn_time)
       | Server_response response ->
-        Pickler.run (Lazy.force Response.pickler) response
+        Pickler.run Response.pickler response
   end
 
   module Transport = struct