From f9fcd2c73311a83637927264675bb81579ed6271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Tue, 3 Aug 2021 09:26:07 +0200 Subject: [PATCH] Use Cstruct.length and require cstruct >= 6.0.0 --- builder-web.opam | 1 + db/representation.ml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/builder-web.opam b/builder-web.opam index 68cb62a..352d601 100644 --- a/builder-web.opam +++ b/builder-web.opam @@ -17,6 +17,7 @@ build: [ depends: [ "builder" "dream" {>= "1.0.0~alpha2"} + "cstruct" {>= "6.0.0"} "bos" "hex" "caqti" diff --git a/db/representation.ml b/db/representation.ml index 1fa626b..a4e6886 100644 --- a/db/representation.ml +++ b/db/representation.ml @@ -2,7 +2,7 @@ module Asn = struct let decode_strict codec cs = match Asn.decode codec cs with | Ok (a, cs) -> - if Cstruct.len cs = 0 + if Cstruct.length cs = 0 then Ok a else Error "trailing bytes" | Error (`Parse msg) -> Error ("parse error: " ^ msg)