Streamline module structure and imports #367
Labels
documentation
Improvements or additions to documentation
help wanted
Extra attention is needed
masonry
Issues relating to the Masonry widget layer
Module structure
Virtually every module should be private. The only public modules should inline modules that gather public-facing re-exports.
Most items should be exported from the root module, with no other public-facing export. This makes documentation more readable; readers don't need to click on multiple modules to find the item they're looking for.
There should be only three public modules:
widgets
commands
test_widgets
Module files should not be
foobar/mod.rs
. Instead, they should_foobar.rs
(thus in the parent folder); the full name is for readability, the leading underscore is so these names appear first in file hierarchies.Imports
We should avoid
use super::xxx
imports, except for specific cases like unit tests.Most imports in the code base should use the canonical top-level import.
Prelude
Masonry should have no prelude. Examples and documentation should deliberately have a list of imports that cover everything users will need, so users can copy-paste these lists.
The text was updated successfully, but these errors were encountered: