Can you please clarify if I'm thinking right.
Say I have a program that's structured like this:
project_name |__ Cargo.toml |__ src/ |__ main.rs |__ prelude.rs |__ products/ | |__ mod.rs | |__ prodA.rs | |__ prodB.rs | |__ prodC.rs |__ os/ |__ mod.rs |__ os_v1.rs
In all of
prodA, prodB, prodC, os_v1 files, I use some functions commonly.
Am I right in putting them all in
prelude.rs, so that Rust automatically inserts the
mod crate::prelude statements into the above listed files?
Does this make sense?
If so, is this the right way of doing it?
Thanks as always!