3 ms·
It's my bad I thought I could remove the mod.rs that just redeclares the submodules in my case.
by tym0 6y ago
It's my bad I thought I could remove the mod.rs that just redeclares the submodules in my case.
- JoshTriplett 6y agoIf you'd like to have two modules, `main.rs` and `foo/bar.rs`, and you want the latter to be `foo::bar`, you can do this in `main.rs` to avoid needing a foo.rs that just does `mod bar;`: mod foo { mod bar; }
- tym0 6y agoI was just following the example from the docs, my use case is more like this: . ├── lib.rs └── foo/ └── mod.rs └── one.rs └── two.rs └── three.rs └── four.rs └── bar/ └── mod.rs └── one.rs └── two.rs └── three.rs └── four.rs Which feels to me like a very common folder structure in other languages.