20 ms·
Note that the "new" way to do modules with your file hierarchy is to have foo.rs instead of foo/mod.rs. foo.rs is at the same level as folder foo, foo/mod.rs is
by bobbylarrybobby 4y ago
Note that the "new" way to do modules with your file hierarchy is to have foo.rs instead of foo/mod.rs. foo.rs is at the same level as folder foo, foo/mod.rs is gone, and everything else is the same.
Not sure whether this is truly better, but it does make it much easier to search for the file containing the module foo -- with the old way, you would have one mod.rs per module which quickly got painful when searching.
- pjmlp 4y agoOnly for simple modules, if they get complex enough, one will quickly use the "old" approach with multiple files.