anmonteiro / anmonteiro/httpun
Improve order of arguments in Httpun_eio.Server.create_connection_handler for currying
- Ngôn ngữ chính
- OCaml
- Star
- 63
- Fork
- 13
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
(see also anmonteiro/ocaml-h2#258)
The last two arguments of:
```ocaml
Httpun_eio.Server.create_connection_handler ... client_addr socket
```
should be switched to:
```ocaml
Httpun_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 =
Httpun_eio.Server.create_connection_handler ... client_addr socket
in
Eio.Net.run_server ... connection_handler
```
to:
```ocaml
let connection_handler = Httpun_eio.Server.create_connection_handler ... in
Eio.Net.run_server ... connection_handler
```
@anmonteiro Would you accept a PR that fixed this?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.