anmonteiro / anmonteiro/ocaml-h2
Improve order of arguments in H2_eio.Server.create_connection_handler for currying
- Lingua principale
- OCaml
- Stelle
- 318
- Fork
- 37
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
(see also anmonteiro/httpun#154)
The last two arguments of:
```ocaml
H2_eio.Server.create_connection_handler ... client_addr socket
```
should be switched to:
```ocaml
H2_eio.Server.create_connection_handler ... socket client_addr
```
This would allow for currying in `Eio.Net.run_server`, i.e. simplifying usage from:
```ocaml
let connection_handler socket client_addr =
H2_eio.Server.create_connection_handler ... client_addr socket
in
Eio.Net.run_server ... connection_handler
```
to:
```ocaml
let connection_handler = H2_eio.Server.create_connection_handler ... in
Eio.Net.run_server ... connection_handler
```
@anmonteiro Would you accept a PR that fixed this?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.