servo / font-kit

A cross-platform font loading library written in Rust
Apache License 2.0
693 stars 104 forks source link

Export types and not modules. #70

Closed RazrFalcon closed 5 years ago

RazrFalcon commented 5 years ago

This is mainly a stylistic change, since I don't think that we need a complex modules structure for like 20 types. And this more Rust-like, imo.

pcwalton commented 5 years ago

I deliberately don't like doing this in crates that I maintain, because the compiler is not very good at saying where you should import a type from in error messages. Also, when I read library code as a user of the library, I like to be able to look at the "use" directives to see where the public types live, without having to search for "pub use". I find that a lot of Rust crates overuse "pub use" and it makes them really confusing, and I don't want to make it worse.

RazrFalcon commented 5 years ago

I see. That was just a proposal.