From 10347ad5173f04ec7d21c61425305c0663672953 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 19 Jun 2023 20:30:47 +0200 Subject: [PATCH] type annotation --- lib/response.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/response.ml b/lib/response.ml index 8d96e82..0cb7144 100644 --- a/lib/response.ml +++ b/lib/response.ml @@ -1,7 +1,7 @@ open Types open Utils -let parse_header reader = +let parse_header (reader : reader) = let max_size = 6 in match List.init max_size (fun offset -> unpack_short_be reader.data (offset * 2)) with | [ id; flags; num_questions; num_answers; num_authorities; num_additionals ] -> @@ -10,7 +10,7 @@ let parse_header reader = | _ -> failwith "Invalid number of fields" ;; -let rec parse_question reader = +let rec parse_question (reader : reader) = let name, offset_name = decode_name reader in let data = bytes_forward reader.data (reader.pointer + offset_name) in let max_size = 2 in