Skip to content

Commit 22f9ff8

Browse files
committed
Uncommon: remove unused failwith
1 parent 8df7584 commit 22f9ff8

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

rng/entropy.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ let cpu_rng_bootstrap =
120120
| Some insn ->
121121
let cpu_rng_bootstrap id =
122122
let r = cpu_rng insn () in
123-
if r = 0 then failwith "bad CPU RNG value";
123+
if r = 0 then failwith "Mirage_crypto_rng.Entropy: 0 is a bad CPU RNG value";
124124
let buf = Bytes.create 10 in
125125
Bytes.set_int64_le buf 2 (Int64.of_int r);
126126
write_header id buf;

src/mirage_crypto.mli

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ module Uncommon : sig
3838
val xor_into : string -> src_off:int -> bytes -> dst_off:int -> int -> unit
3939

4040
val invalid_arg : ('a, Format.formatter, unit, unit, unit, 'b) format6 -> 'a
41-
val failwith : ('a, Format.formatter, unit, unit, unit, 'b) format6 -> 'a
4241
end
4342

4443
(**/**)

src/uncommon.ml

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ let kasprintf k fmt =
44
Format.(kfprintf (fun _ -> k (flush_str_formatter ())) str_formatter fmt)
55

66
let invalid_arg fmt = kasprintf invalid_arg ("Mirage_crypto: " ^^ fmt)
7-
let failwith fmt = kasprintf failwith ("Mirage_crypto: " ^^ fmt)
87

98
let (//) x y =
109
if y < 1 then raise Division_by_zero else

0 commit comments

Comments
 (0)