Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename modules to follow new convention #843

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions masonry/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@ Virtually every module should be private. The only public modules should be inli

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:
There should be only two public modules:

- `widgets`
- `commands`
- `test_widgets`

Module files should not be `foobar/mod.rs`. Instead, they should be `_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.
Module files should not be `foobar/mod.rs`. Instead, they should be `foobar/_foobar.rs`.
The full name is for readability when multiple module files are open in a text editor.
The leading underscore is so these names appear first in file hierarchies.

### Imports

Expand Down
File renamed without changes.
5 changes: 5 additions & 0 deletions masonry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
mod util;

#[cfg(doc)]
#[path = "doc/_doc.rs"]
pub mod doc;

mod action;
Expand All @@ -156,14 +157,18 @@ mod box_constraints;
mod contexts;
mod event;
mod paint_scene_helpers;
#[path = "passes/_passes.rs"]
mod passes;
mod render_root;
mod tracing_backend;

pub mod event_loop_runner;
#[path = "testing/_testing.rs"]
pub mod testing;
#[path = "text/_text.rs"]
pub mod text;
pub mod theme;
#[path = "widget/_widget.rs"]
pub mod widget;

pub use cursor_icon;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mod widget_ref;
mod widget_state;

#[cfg(test)]
#[path = "tests/_tests.rs"]
mod tests;

mod align;
Expand Down
File renamed without changes.
Loading