upstream: github.com/mirleft/ocaml-tls
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(lint): resolve E110 silenced warnings in tls, tomlt

- ocaml-tls/bench/speed.ml: replace [@warning "-8"] partial matches
with proper match expressions that handle the None case.

- ocaml-tomlt/lib/tomlt.ml: remove [@warning "-37"] by actually using
Unknown_member (in error_unknown table handler) and Parse_error
(in int/int64 string parsing). error_unknown now returns a codec
error instead of raising a Toml.Error exception.

- ocaml-tomlt/test/cookbook.ml: remove [@@@warning "-32"] by adding
example TOML strings and decode_and_print calls for all codecs
(retry_config, point, host_only, strict_config, port, percentage).

- ocaml-tomlt/test/test_codec.ml: update error_unknown test to expect
Error result instead of exception.

+10 -10
+10 -10
bench/speed.ml
··· 87 87 88 88 let actually_send_application_data client_state server_state direction buf = 89 89 match direction with 90 - | `To_server -> 91 - let[@warning "-8"] (Some (client_state, to_server)) = 92 - Tls.Engine.send_application_data client_state [ buf ] 93 - in 94 - To_server (client_state, server_state, Some to_server) 95 - | `To_client -> 96 - let[@warning "-8"] (Some (server_state, to_client)) = 97 - Tls.Engine.send_application_data server_state [ buf ] 98 - in 99 - To_client (client_state, server_state, Some to_client) 90 + | `To_server -> ( 91 + match Tls.Engine.send_application_data client_state [ buf ] with 92 + | Some (client_state, to_server) -> 93 + To_server (client_state, server_state, Some to_server) 94 + | None -> failwith "send_application_data returned None (to server)") 95 + | `To_client -> ( 96 + match Tls.Engine.send_application_data server_state [ buf ] with 97 + | Some (server_state, to_client) -> 98 + To_client (client_state, server_state, Some to_client) 99 + | None -> failwith "send_application_data returned None (to client)") 100 100 101 101 let rec once state buf = 102 102 match (state.flow, buf) with