From c284fcd570342c31bc21169960579a20a763e32e Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Tue, 23 Jun 2026 23:53:26 -0300 Subject: Format --- lib/hashing.ml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib/hashing.ml') diff --git a/lib/hashing.ml b/lib/hashing.ml index ff8436b..cc4bf10 100644 --- a/lib/hashing.ml +++ b/lib/hashing.ml @@ -16,9 +16,7 @@ let bytes_to_hex bytes = let hi = c lsr 4 in let lo = c land 0xf in Bytes.set hex (i * 2) (Char.chr (if hi < 10 then hi + 48 else hi + 87)); - Bytes.set hex - ((i * 2) + 1) - (Char.chr (if lo < 10 then lo + 48 else lo + 87)) + Bytes.set hex ((i * 2) + 1) (Char.chr (if lo < 10 then lo + 48 else lo + 87)) done; Bytes.to_string hex @@ -35,11 +33,9 @@ let hash_tuple (tuple : Tuple.materialized) : Conventions.Hash.t = List.fold_left (fun acc (name, attr) -> (* Marshal the value and hex-encode to avoid null bytes *) - let value_bytes = - Marshal.to_bytes attr.Attribute.value [ Marshal.Closures ] - in + let value_bytes = Marshal.to_bytes attr.Attribute.value [Marshal.Closures] in let value_hex = bytes_to_hex value_bytes in - acc ^ name ^ ":" ^ value_hex ^ ";") + acc ^ name ^ ":" ^ value_hex ^ ";" ) (tuple.relation ^ "|") sorted_attrs in Conventions.Hash.hash_text content -- cgit v1.2.3