4 ms·
I was expecting something about how you can't move code into a new file without creating a new module, which means you'll need to modify calling code if you wan
by curtis3389 3y ago
I was expecting something about how you can't move code into a new file without creating a new module, which means you'll need to modify calling code if you want to reorganize stuff, so you end up with massive source files.
- drewtato 3y agoYou can fix this by doing `pub use module::*`.
- 2h 3y agowildcard import, definitely no drawbacks to those!
- eftychis 3y agoYou mean that if you split a file you define another module when you declare it? That is only visible as a module at the level of declaration not beyond. Also note that modules are not per se compile units. Cf. See https://doc.rust-lang.org/rust-by-example/mod/split.html https://doc.rust-lang.org/rust-by-example/mod/split.html Edit: typo.