loading...

Discussion on: Understanding Rust modules

Collapse
elasticrash profile image
Stefanos Kouroupis

I think the confusion starts when you want to use modules within each other but don't want to have like 10 layer deep structure. That's why when I use rust I use a more flatten out structure. By creating standalone modules in the code root directory and then use the use the use create

i.e.

use crate::functions::stats::*;
use crate::functions::analyse::*;
Collapse
dandyvica profile image
Alain Viguier Author

Thanks for your reply.

I like things to be tidy, that's why I much prefer a hierarchical structure. But that's just a personal opinion.