DEV Community

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::*;
Enter fullscreen mode Exit fullscreen mode
Collapse
 
dandyvica profile image
Dandy Vica

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.