Open dekellum opened 6 years ago
Hey! The reason (if you could call it that – I didn't think about it too much) for using the re-exports was that it meant I didn't have to add extra extern crate
s, and therefore didn't have to declare extra dependencies, which I'd then have to make sure to been in sync with the other dependencies. This seemed like unnecessary effort. I didn't really think of any advantages. I will ask some other Rustaceans I know and see what I find.
For the http crate types
Request
,Response
,HeaderMap
, etc, while these types are also re-exported by hyper, I think the http crate docs are better as a whole, and its less cognitive burden to reference these types directly, in your top level usage example and code. The same argument could be made for the futures and tokio crate types, though http was the first I noticed.This said, I've developed some bias against broad use of re-exports, so I'd also appreciate hearing reasonable arguments for using those re-exports, and would encourage you to collect other opinions.