Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove types.rs #958
Closed
Remove types.rs #958
Comments
bors-servo
added a commit
that referenced
this issue
Mar 7, 2017
Remove types.rs and move its types into the relevant files. Addresses issue #958. The rules followed to decide in where to move each type were roughly: - Above all, types and their impls should be in the same file. - If a "well defined category" of types and their impls represents more than a 100 lines of code, move it into its own file (example: font.rs and image.rs). - If something is only used in one file it goes there (for example a lot of the code that moved into api.rs). - On the other hand if it is not immediately obvious where a type should be (and it's more than a few lines), move it in its own file (like color.rs). - display_item.rs contains display item types while display_list.rs contains code to build and serialize display lists. both files being rather big, keep them separate. - Since all types were exported in webrender_traits' global namespace, all relevant modules ```pub use foo::*;``` there types in as well. If we want to change that, let's do it as a followup since it would add a lot code churn outside of webrender_traits. The resulting organization is, I think, a lot less surprising. Let me know what you think. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/963) <!-- Reviewable:end -->
|
This can be closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was needed only for serde_codegen support. Now that this is gone, we can remove types.rs and move back each type from it to the module where each of them truly belongs.