From a1b30417e26f182ae0451554d3dcaf4f73578440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Henry?= Date: Tue, 20 Feb 2018 18:29:37 +0100 Subject: [PATCH] Fix indent --- vendors/ocaml-bip39/src/bip39.ml | 6 +++--- vendors/ocaml-bip39/test/test.ml | 16 ++++++++-------- vendors/ocaml-pbkdf/src/pbkdf.ml | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/vendors/ocaml-bip39/src/bip39.ml b/vendors/ocaml-bip39/src/bip39.ml index d7a4ae44d..03fbe0dd1 100644 --- a/vendors/ocaml-bip39/src/bip39.ml +++ b/vendors/ocaml-bip39/src/bip39.ml @@ -102,9 +102,9 @@ let pack l pack_len = let rec inner (sub_acc_len, sub_acc, acc) = function | [] -> if sub_acc <> [] then List.rev sub_acc :: acc else acc | h :: tl -> - if sub_acc_len = pack_len then - inner (1, [h], List.rev sub_acc :: acc) tl - else inner (succ sub_acc_len, h :: sub_acc, acc) tl + if sub_acc_len = pack_len then + inner (1, [h], List.rev sub_acc :: acc) tl + else inner (succ sub_acc_len, h :: sub_acc, acc) tl in List.rev (inner (0, [], []) l) diff --git a/vendors/ocaml-bip39/test/test.ml b/vendors/ocaml-bip39/test/test.ml index 2e169e416..0fbef0880 100644 --- a/vendors/ocaml-bip39/test/test.ml +++ b/vendors/ocaml-bip39/test/test.ml @@ -108,15 +108,15 @@ let vectors = [ let pp_diff ppf (l1, l2) = match List.length l1, List.length l2 with | n, m when n <> m -> - Format.fprintf ppf "Mnemonic size differs: %d vs %d" n m ; + Format.fprintf ppf "Mnemonic size differs: %d vs %d" n m ; | _ -> - ignore @@ ListLabels.fold_left2 l1 l2 ~init:0 ~f:begin fun i w1 w2 -> - if w1 <> w2 then begin - Format.fprintf ppf "At position %d, words differ: %s <> %s" - i w1 w2 - end ; - succ i - end + ignore @@ ListLabels.fold_left2 l1 l2 ~init:0 ~f:begin fun i w1 w2 -> + if w1 <> w2 then begin + Format.fprintf ppf "At position %d, words differ: %s <> %s" + i w1 w2 + end ; + succ i + end let vectors () = ListLabels.iteri vectors ~f:begin fun i { entropy ; words ; seed } -> diff --git a/vendors/ocaml-pbkdf/src/pbkdf.ml b/vendors/ocaml-pbkdf/src/pbkdf.ml index e8f5e8b8b..9e8e6d89e 100644 --- a/vendors/ocaml-pbkdf/src/pbkdf.ml +++ b/vendors/ocaml-pbkdf/src/pbkdf.ml @@ -31,7 +31,7 @@ module Make (H: Hash.S) : S = struct let rec f u xor = function 0 -> xor | j -> let u = H.hmac ~key:password u in - f u (Cs.xor xor u) (j - 1) + f u (Cs.xor xor u) (j - 1) in let int_i = Cstruct.create 4 in Cstruct.BE.set_uint32 int_i 0 (Int32.of_int i);